modified the formulas