max formulas implemented