working on generator object