replace switch to switch_id