Generators how do they work?