better sort and array