new random uses stream
output can print stream
optimize stream random
refactor and fixes