made the class more robust n stuff