reworked randomWalk as traversal