update summary function