updating switches