refactored generators to use less anonymous wrappers