refactor current tab  method