refactor tabs