complete search method