Implementing the maximum reducer.