Mapper and Reducer codes for final project