replaced references to constants with reference to class variable