quickSort with median pivot done