adding pin's map-reduce