implemented more features into the new codegen feature