added getOrphanEdgeIds function