refactored Generators, extracted generateProvider()