add random selection function