some randomized pathfinding stuff
merged