example of using mongoid and map reduce function