finish display grouping statisitics function