better search string and cleanup