off by one in examples/random.php