 
     // MARK:- UITableViewDataSource
     func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
-        return self.teamList.count
+        return isSearching() ? self.filteredTeamList.count : self.teamList.count
     }
     
     func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
-        let teamName = self.teamList[indexPath.row]
+        let teamName = isSearching() ? self.filteredTeamList[indexPath.row] : self.teamList[indexPath.row]
         
         let cell: TeamCell = tableView.dequeueReusableCellWithIdentifier("TeamCell") as! TeamCell
         cell.configureFor(name: teamName)

        let team: Team = Team(name: teamName, observed: false)
        team.save()
    }
}

import UIKit
import SVProgressHUD

class ObservedTeamsVC: BaseVC, UITableViewDataSource, UITableViewDelegate, UISearchResultsUpdating {

    @IBOutlet weak var table: UITableView!
    let searchController = UISearchController(searchResultsController: nil)
    
    
    let zmonTeamService: ZmonTeamService = ZmonTeamService()
    var teamList: [String] = []
    var filteredTeamList = [String]()
    
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.navigationItem.title = "ObservedTeams".localized
        self.setupSearch()
        
        self.table.dataSource = self
        self.table.delegate = self
