replaced each iterator with inject