use type switch