Route switch logic