Added pivot randomization to selection process