updated mapReduce function to correct month off by one bug