sorted the output