Initial chained map reduce implementation