implement switch on click and close tabster