modified search functionality