[random-walk] small refactor