Reworked to switch