added qsort
added clone array