Reimplemented summarize() and made the ES PEG generic