The effect of the higher-order spin terms in the generalized spin hamiltonian on the g values