#252 Finished to implement grouping of events