Now supports sorts in both directions