restructuring map/reduce for change labeling