added indegree and outdegree