small refactor in cavewalk