updates the cartracker class, adding a function to update all variables when an event is detected.