refactored generators