Added my max and min functions in