replace common path