fixing the formulas for the last time