Implementing map reduce algorithm...