sorting the right thing