added node degree and maxDegree