Added sorted output.