Testing sorting the preference list