better search string replace code