add sort on group