My own implementation of MapReduce