added more group by