     
     override func viewDidLoad() {
         super.viewDidLoad()
+        let button1 = UIButton()
+        let button2 = UIButton()
+        let action = Action<String,String> { input in
+            print(input)
+            return .just(input)
+        }
+        button1.rx.bind(to:action) {_ in return "Hello"}
+        button2.rx.bind(to:action) {_ in return "Goodbye"}
+        
         view.backgroundColor = .white
         setup()
     }


// MARK: - Extensions -

extension RotatingButtonsViewController: CAAnimationDelegate {
    
    func animationDidStop(_ anim: CAAnimation, finished flag: Bool) {
        switch self.state {
        case .left:
            leftButtonLeftAnchor?.isActive = false
            leftButtonRightAnchor?.isActive = true
            rightButtonLeftAnchor?.isActive = true
            rightButtonRightAnchor?.isActive = false
            view.bringSubview(toFront: leftButton)
            self.state = .right
        case .right:
            leftButtonLeftAnchor?.isActive = true
            leftButtonRightAnchor?.isActive = false
            rightButtonLeftAnchor?.isActive = false
            rightButtonRightAnchor?.isActive = true
            view.bringSubview(toFront: rightButton)
            self.state = .left
        }
        leftButton.layoutIfNeeded()
        rightButton.layoutIfNeeded()
        isAnimating.value = false
    }
    
}

extension RotatingButtonsViewController: RotatingButtonsViewModelDelegate {
    
}

    let animationDuration: TimeInterval
    let enterString: String
    let exitString: String
    var leftButtonAnimation: CAAnimationGroup!
    lazy var leftButton: UIButton = {
        let button = self.createButton()
        self.createTapEvent(forButton: button).subscribe(onNext: { _ in
            self.handleEndAnimation(isLeftButton: true)
            }).addDisposableTo(self.rx_disposeBag)
        button.backgroundColor = .green
        button.setTitle(self.enterString, for: .normal)
        return button
    }()
    lazy var rightButton: UIButton = {
        let button = self.createButton()
        self.createTapEvent(forButton: button).subscribe(onNext: { _ in
            self.handleEndAnimation(isLeftButton: false)
            }).addDisposableTo(self.rx_disposeBag)
        button.backgroundColor = .red
        button.setTitle(self.exitString, for: .normal)
        return button
