adding internal attributes to graphs and edges