Better switch-to function.