intermediate code generator works