modified Array#stats to sort_by value