added a reduceValues method to avoid using combiners