finally get search work