added codegen feature