added some code for summarization