before search