Added pluggable random number generator