add quick sort
quick sort implementation and refactoring for old code