trying to implement switching of tabs by pressing TAB, not completed