refactored tab creation, working only for appending