trouble with quick sort