- updated the variable to detect the "charging" event