generators reafactoring