cleanup sort