toggling when the user selects one of the buttons