changed astar a bit