working pathfinding with a*