adding arcs at both directions