I don't think `isSwitchable` is needed anymore in this function, is it?