Sort new document