[mod] slight improvements for addEdge