working on generator stuffs