We build a model beyond the Standard Model with three generations of fermions. We study the mass hierarchy of the fermions and their mixing angles using a U(1)X gauge symmetry anomaly free. The model contains additionally exotic up-
like quark, two bottom-like quarks, two charged leptons and three right handed neutrino. Three right-handed sterile neutrinos are aklso introduced to implement the inverse seesaw mechanism to understand the squared mass differences of the active neutrinos and the mixing angles. To generate the zeros of the mass matrices of the fermions and solve the CP-problem, the Peccei Quinn symmetry is implemented. In addition, the model contains two Higgs doublets which give masses to the fermions, and two scalar singlet.One of them breaks the U(1)X gauge symmetry and give mass to the exotic particles. The other helps to give masses to the light fermions throught radiative corrections.