Added function of searching valid random numbers
Added function of searching valid random numbers