 		processingLock.lock()
 
 		for e in edges {
-
 			e.from.outEdges.append(e)
-
-			if (e.bidirectional == true) {
-				e.to.outEdges.append(Edge(from: e.to, to: e.from,
-					cost: e.cost, bidirectional: e.bidirectional))
+			if (e.bidirectional) {
+				e.to.outEdges.append(e.reversedEdge)
 			}
 		}
 

		self.bidirectional = bidirectional
	}

	public var description: String {
		return "\(from.ID) -> \(to.ID)"
	}


		while (top != nil) {
			path.insert(top!, at: 0)
			top = top!.parentNode
		}

		self.resetElements()
