support gen code