pathfinding in stack & debugmap