added functions for vertex indegree and vertex outdegree calculation