/* hooks for switch */