updated SortBy to operate on IComparables