Worked how to add and remove tabs based on code