Added addnode and addedge func to Graph