update switch mode