switch to pathname