remove some GLOBALS usage