add my own mapreduce function