basic structure for generator
working generator