Implemented actual working algorithm (quicksort)