update search routine.