implemented advanced search