fixed math formulas