added the feature of making summary