add MaxBy, MinBy, SumBy functions