add global variables code generation