more code generation
Merge pull request #787 from xuwei-k/code-generation

more code generation