debugging search functionality