changes in aggregation and sorting in CTree