change the way to find local optima.