Added EOS to MapReduce code