switch tab logic & tabs centering