made switching not need submit button