refactorized RNG version and checked it's working as expected
Merge pull request #124 from jim17/master

refactorized RNG version and checked it's working as expected