update switch example