summarizer now gets document from database