Add directional sorting