sketch of the advanced search method