ms_summary code clean