added support for global variables