group by category now works