fixing the search

it ain't pretty, but it's getting there.