     
     var items = [SpeakerSection]()
     var filteredItems = [SpeakerSection]()
+    
+    var currentItems: [SpeakerSection] {
+        return isFiltering ? filteredItems : items
+    }
     
     var favorites = Favorite.allSpeakerFavoriteIDs()
     

    //MARK: - table view methods
    
    func numberOfSectionsInTableView(tableView: UITableView) -> Int {
        let items = isFiltering ? filteredItems : self.items
        
        return items.count
    }
    
    func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        let items = isFiltering ? filteredItems : self.items
        
        let section = items[section]
        return section[section.keys.first!]!.count
    }
    
    func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
        let items = isFiltering ? filteredItems : self.items
        
        let cell = self.tableView.dequeueReusableCellWithIdentifier("SpeakerCell") as! SpeakerCell
        
        //eg guard
        if indexPath.section >= items.count {
            return cell
        }
        
        let section = items[indexPath.section]
        let row = section[section.keys.first!]![indexPath.row]
        
        let userImage = row[Speaker.photo]?.imageValue ?? UIImage(named: "empty")!

        btnFavorites.animateSelect(scale: 0.8, completion: nil)
        
        backgroundQueue({ self.filterItemsWithTerm(nil, favorites: self.btnFavorites.selected) },
            completion: {
                    //show no sessions message
                    let items = self.isFiltering ? self.filteredItems : self.items
                    let section = items.first!
                    let nrResults = section[section.keys.first!]!.count

                    if nrResults == 0 {
                        self.tableView.addSubview(MessageView(text: "You didn't favorite any speakers yet"))
                    } else {
                        MessageView.removeViewFrom(self.tableView)
                    }
                    self.tableView.reloadData()
        })
    }

}
