debug sort for charlie