if conditional for random number