sort the output