replace sub string with get path method