sorting revisions upon output