Creating addEdge API and refactoring code to use it