The flavor-changing neutral current (FCNC) problem at tree-level is a very critical defect of the two Higgs doublet extension of standard model (SM). In this article, a two-Higgs-doublet model (2HDM) in which such defects do not exist at all is to be demonstrated. The general pattern of matrix pairs which can be diagonalized simultaneously by a same unitary transformation is proposed without extra constraints like symmetries or zeros in M matrices. Only an assumption of the hermiticity of mass matrices is employed in the derivation. With this assumption, number of parameters in the mass matrix of a specific fermion type is reduced from eighteen down to five. Eigenvalues and eigenvectors are analytically derived and its surprising that unitary transformation matrix thus derived depends on only two parameters. It is a very general and elegant way to solve the tree-level FCNC problem radically and it includes previous similar models as special cases with specific parameter values.