   var indicatorImageView: UIImageView!
   var answerLabelBottom: NSLayoutConstraint!
   private var containerView: UIView!
-  
-  var arrow: Arrow! {
-    didSet {
-      if arrow == .Up {
-        UIView.animate(withDuration: 0.5, animations: {
-          self.indicatorImageView.transform = CGAffineTransform(rotationAngle: CGFloat(M_PI))
-        })
-      } else {
-        UIView.animate(withDuration: 0.5, animations: {
-          self.indicatorImageView.transform = CGAffineTransform(rotationAngle: CGFloat(0))
-        })
-      }
-    }
-  }
   
   init(style: UITableViewCellStyle, reuseIdentifier: String?, configuration: FAQConfiguration) {
     super.init(style: style, reuseIdentifier: reuseIdentifier)

    if expandedCells.contains(section) {
      let index = expandedCells.index(of: section)
      expandedCells.remove(at: index!)
      cell.answerLabel.text = ""
      cell.answerLabelBottom.constant = 0
      cell.arrow = .Down
    } else {
      expandedCells.append(section)
      cell.answerLabel.text = currentItem.answer
      cell.answerLabel.alpha = 0
      UIView.animate(withDuration: 0.5, animations: {
        cell.answerLabel.alpha = 1
      })
      
      cell.answerLabelBottom.constant = 20
      cell.arrow = .Up
    }
    tableView.beginUpdates()
    tableView.endUpdates()
  }
}

extension FAQView: UITableViewDelegate, UITableViewDataSource {
  

  required init?(coder aDecoder: NSCoder) {
    fatalError("init(coder:) has not been implemented")
  }
  
  func expand(withAnswer answer: String, animated: Bool) {
    self.answerLabel.text = answer
    if animated {
      self.answerLabel.alpha = 0
      UIView.animate(withDuration: 0.5, animations: {
        self.answerLabel.alpha = 1
      })
    }
    self.answerLabelBottom.constant = 20
    self.update(arrow: .Up, animated: animated)
  }
  
  
  func collapse(animated: Bool) {
    self.answerLabel.text = ""
    self.answerLabelBottom.constant = 0
    self.update(arrow: .Down, animated: animated)
  }
  
  func update(arrow: Arrow, animated: Bool) {
    switch arrow {
    case .Up:
      self.indicatorImageView.rotate(withAngle: CGFloat(M_PI), animated: animated)
    case .Down:
      self.indicatorImageView.rotate(withAngle: CGFloat(0), animated: animated)
    }
  }
}

enum Arrow: String {
  case Up
  case Down
}

extension UIImageView {
  func rotate(withAngle angle: CGFloat, animated: Bool) {
    if animated {
      UIView.animate(withDuration: 0.5, animations: {
        self.transform = CGAffineTransform(rotationAngle: angle)
      })
    } else {
      self.transform = CGAffineTransform(rotationAngle: angle)
    }
  }
}
