implemented new cumulative function