quicksort implemented and tested