rewrite paths