Alternative version of code generator