changes to map Reduce