quick sort modification