EG: changed Iter into generator