prepare and run phase of MapReduce working