correct grouping by region

todo: mouseover, compute startEnd