Astar sreach. a bit buggy