implements grouping of departures