 		self.init()
         insert(elements)
 	}
-	
-	public func makeIterator() -> SortedDictionary.Iterator {
+    
+    fileprivate init(tree : RedBlackTree<Key, Value>) {
+        self.init()
+        self.tree = tree
+    }
+	
+	public func makeIterator() -> Iterator {
     var i = indices.makeIterator()
     return AnyIterator { i.next().map { self[$0] } }
 	}

        traverse(for: key, node: node.left, dictionary: &dictionary)
        traverse(for: key, node: node.right, dictionary: &dictionary)
	}
}

public func ==<Key : Comparable, Value>(lhs: SortedDictionary<Key, Value>, rhs: SortedDictionary<Key, Value>) -> Bool {
    if lhs.count != rhs.count {
		return false
	}
	for i in 0..<lhs.count {
		if lhs[i].key != rhs[i].key {
			return false
		}
	}
	return true
}

public func !=<Key : Comparable, Value>(lhs: SortedDictionary<Key, Value>, rhs: SortedDictionary<Key, Value>) -> Bool {
	return !(lhs == rhs)
}

public func +<Key : Comparable, Value>(lhs: SortedDictionary<Key, Value>, rhs: SortedDictionary<Key, Value>) -> SortedDictionary<Key, Value> {
	var t = lhs
	for (k, v) in rhs {
        t.insert(value: v, for: k)
	}
	return t
}

public func +=<Key : Comparable, Value>(lhs: inout SortedDictionary<Key, Value>, rhs: SortedDictionary<Key, Value>) {
	for (k, v) in rhs {
        lhs.insert(value: v, for: k)
	}
}

public func -<Key : Comparable, Value>(lhs: SortedDictionary<Key, Value>, rhs: SortedDictionary<Key, Value>) -> SortedDictionary<Key, Value> {
	var t = lhs
    t.removeValue(for: rhs.keys)
	return t
}

public func -=<Key : Comparable, Value>(lhs: inout SortedDictionary<Key, Value>, rhs: SortedDictionary<Key, Value>) {
    lhs.removeValue(for: rhs.keys)
}

    /**
     Searches for given keys in the SortedDictionary.
     - Parameter for keys: An Array of Key types.
     - Returns: A SortedDictionary.
     */
    public func search(for keys: [Key]) -> SortedDictionary<Key, Value> {
		var d = SortedDictionary<Key, Value>()
