Search method debugged.