add quick sort
small refactor