added function multi_array_sort