add random algorithm