implement iteration over edges