modified mapper and reducer