now A* should work properly