Sorting an Array By 1 Variable Then By Another