Added array co-sorting.