Setting up generator.