implemented max and sum challenges