initial map reduce code