fixing up search()