Implemented mapEdges