first version of the generator