@sorted = sort {$$b[1]-$$a[1]} @tmp;