add implementation for pick_pivot in quick_sort