code generation work