adding docs for r.random
fixing r.random for review comments
fixing missing case in r.random