removed some more global variables