Basic search logic