Random number generators and lengthIf