Preexisting bug: case 7 and below can never happen as the call `rng(1,6)` only returns numbers 1 to 6. It's not subject of this PR, but you could change that to `rng(1,8)`.