Added partition and quicksort function