 
 class MasterViewController: UITableViewController, UserInteractable, View, UISplitViewControllerDelegate, MasterControllerDelegate {
     typealias Event = MasterEvent
-    typealias State = [UIViewController]
+    typealias State = [NameAndSegue]
     
     var disposeBag = DisposeBag()
     

    func flatMapEventToAction(event: Event) -> Observable<Action> {
        switch event {
        case .ClickItem(let item):
            self.delegate?.showSelectedViewController(item)
        }
        return Observable.empty()
    }

    
    
    func update(stateStream: Observable<State>) -> Disposable {
        return CompositeDisposable(disposables: [
            stateStream.bindTo(tableView.rx_itemsWithCellIdentifier("Cell", cellType: UITableViewCell.self)) { (row, element, cell) in
                cell.textLabel?.text = element.name
            }])
    }
    
    func interact() -> Observable<Event> {
        return [
            tableView.rx_modelSelected(NameAndSegue).map({vc in MasterEvent.ClickItem(item: vc)})
            ].toObservable().merge()
    }
    
