fixing r.random for review comments