codegen example