made functions for getUndirected, outDegrees and reverse static inner