not recognizing global var