solution to Sort List