 		
 		set {
 			
-			let from = _children
-			let to = newValue
-
-			if !isInBatch {
+			self.performBatchUpdates {
+				let from = _children
+				let to = newValue
+				
+				from?.forEach {$0.parent = nil}
+				if let treeController = treeController {
+					to.forEach {
+						$0.parent = self
+						$0.willMoveToTreeController(treeController)
+					}
+				}
+				else {
+					to.forEach {$0.parent = self}
+				}
+
+				_children = to
+			}
+
+			/*if !isInBatch {
 				if let from = _children {
 					var set = Set(from)
 					for a in to {

			return _treeController ?? parent?.treeController
		}
		set {
			_treeController = newValue
			didMoveToTreeController(treeController)
		}
	}
	
	open func didMoveToTreeController(_ treeController: TreeController?) {
		children.forEach {$0.didMoveToTreeController(treeController)}
	}
	
	open var isExpandable: Bool = true
	open var canMove: Bool = false
	
	private var removeRange: CountableRange<Int>?
	open var isExpanded: Bool = true {
		willSet {
			guard treeController != nil else {return}
			guard isExpanded else {return}
			guard newValue != isExpanded else {return}

	func performBatchUpdates(_ updates: () -> Void) {
		if !isInBatch {
			let from = _children
			
			var size = isViewable ? 1 : 0
			if let from = from, !isExpandable || isExpanded || !isViewable {
				size = from.reduce(size, {$0 + $1.size})
			}

			
			batchUpdatesCounter += 1
			updates()
