removing global variables