Added prepareForSearch()