changed way to switch tabs