Rename index_switch to indexSwitch