move to resetSearch function