lazy map-reduce solution
lazy map-reduce solution