add random sampling