refactored method #execute_generator