sorter can now sort its own output structure