code generator template