compact & sort