I didn't like the sorted output 'cause it jumbled groups.  Refactored the previous bug fix to avoid sorting.