switching tag detection.