Updating the search logic, now instead using modal popup