optimized performance to linear time. summaries can now be generated in 11 seconds no matter the size of the document