Implementation of grouping of activities