refactor search string