add random select algorithm