implement advanced search for P3