Gave up and using Networkx