refactoring tabs