added extrema for generation method