Sort both directions