changes for map reduce