change sort_by to sort_by! so sorting actually occurs (woops).  Update comments to clarify rationale for sorting.