random search procedure