EG/HM: new better leaves grouping