added UpdateAllSwitches