switch hooks