sort output and fix D-ATC