changing ref to switch_path and switch_url