ref https://stackoverflow.com/questions/7033719/sorting-a-two-dimensional-array-by-second-value
arr.sort_by{|x,y|y} arr.sort_by(&:last)
ref https://stackoverflow.com/questions/7033719/sorting-a-two-dimensional-array-by-second-value
arr.sort_by{|x,y|y} arr.sort_by(&:last)