adding advanced search functionality