moved globalVars to misc