refactored generators.