Adding reduce phase