trial implementation of array multisort