Working on fixing MapReduce algorithm