codegeneration example