repaired getRandomArray; added merge-sort