min formulas implemented