saved codegen.rb with active data generation code