Changed random number generation
Merge branch 'helpers'