added degree and maxDegree for nodes