added support for tab switches