added mapreduce and test