changed doSearch function
all tests passing