Created sorted list for output.