add networkx dependency