grouping almost working