make path rewriting a bit more readable