detect indegrees, outdegree etc