code generation with code templates4