message passing for reduce phase in place