sped up generator with iterator