working on generator
reworked generater