removing global vars