Kinda more restrict on searching for extrema