move displayed sum of events to a helper