add random number checking