Adding sorting functions to alluvials