Use copy function use temp array to store oredered halves of array