removed extrema functions so Andrew can add his.