finished maxima subsection