Add mapreduce implementation