better code and mappers
fixed typos and added cpmments for map-reduce