moved associateVertex to Graph