adding config.generate_on_demand