Changed vector representation to Graph