Updated searching functionality