modified switch.ino file