cleaned up global variables