added iterative quick select