if switch is on then turn on else turn off