Added functionality to sort navigation