First working version of the generator!