Added sort array in place