some search() optimize

No need to getInputText() again. We already have it in checkLoop(), which is the only caller