quick sort routine