Modifie graph class, made node class