Setting up the switch