Rewrite paths