no need for arc4random_uniform() here
Merge branch 'master' into portable