groups are working, but sorting is bottle neck