worked on codegenerator