fixed bug: grouping on empty list raised exception, now returns blank dictionary