adding extrema