quick sort to unsorted array