Attempt at pathfinding (recycled)