adds a function to toggle displaying tabs