how does the switch work?