restructure summary functions