added comments to generate.rb