cleaned the global variables