remove reference to global variable