first implementation of quicksort algorithm
notes updated for part IIa