update switch.