small refactoring: random.cpp created