test for indegree and outdegree