adding random number generator