use dictionary to store node attributes in the graph class
move package lookup into graph class