Finally licked that pesky sorting problem.