adding some changes to quickSort