max and min both need to be recorded