Added some basic generation logic