add comments to A* implementation