updated sorting function for selected navigation list