added summary function at video end