modify Search kernel function