part 1 completed: simple generator