sort after summing