That was my initial thought as well, but I gave up after trying to figure out how to pass my own sorting function and just did this because it's familiar.