Added tab detection method