fixed day-summary function