added indegree/outdegree calculations