Made the sorting useful