replace path with pathid