It now can be created with a string and understand both directed and undirected graphs