beginning search procedure