implemented the getArcs() function