     guard
       let path = root.expandedIndexPath, // get expanded indexPath
       let rootTableView = root.tableView, // get `tableView` from root
-      let detailTableView = detail.tableView, // get `tableView` from detail
       let cell = rootTableView.cellForRow(at: path) as? ElongationCell, // get expanded cell from root `tableView`
       let view = detailView // unwrap optional `detailView`
       else { return }

    let rect = rootTableView.rectForRow(at: path)
    let cellFrame = rootTableView.convert(rect, to: containerView)

//    detailTableView.frame = CGRect(x: 0, y: 0, width: detailViewFinalFrame.width, height: cellFrame.height)
    view.frame = CGRect(x: 0, y: cellFrame.minY, width: detailViewFinalFrame.width, height: cellFrame.height)
    tempView.frame = CGRect(x: 0, y: cellFrame.maxY, width: detailViewFinalFrame.width, height: 0)
    
    // Animate to new state
    UIView.animate(withDuration: duration, delay: 0, options: .curveEaseInOut, animations: {

      contentView.setNeedsLayout()
      contentView.layoutIfNeeded()
    }, completion: { (completed) in
      view.removeFromSuperview()
      context.completeTransition(completed)
    })
