Tweaked randi
Merge branch 'master' into dh/sample
use revised randi in Fisher-Yates shuffling