quick sort implementation and test case