added mapreduce functionality to the user controller.