reversing switch states of buttons