Made the search work