toggleButtons method