added support for globalvar