designing the switch