Application of finite perturbation method in calculating g-factors of free radicals