added getters for numEdges and numNodes