Update switch.m