add quick3waySort