adding common random number generator for input