fix math formula