rename Max/Min to MaxFun/MinFun