refactored tab system