Added new way to do mapreduce