How does a 5 way or 3 way switch work?