a working map reduce