   @IBOutlet weak var tableView: UITableView!
   
   var searchController: UISearchController!
+  
   var suggestedSearchFoods: [String] = []
   var filteredSuggestedSearchFoods: [String] = []
-   var apiSearchForFoods:[(name: String, idValue: String)] = []
+  var apiSearchForFoods:[(name: String, idValue: String)] = []
+  var favoritedUSDAItems:[USDAItem] = []
+  var filteredFavoritedUSDAItems:[USDAItem] = []
+  
   var searchString: String?
   var scopeButtonTitles = ["Recommended", "Search Results", "Saved"]
   var jsonResponse:NSDictionary!
   var dataController = DataController()
-  var favoritedUSDAItems:[USDAItem] = []
  
   override func viewDidLoad() {
     super.viewDidLoad()

    else if selectedScopeButtonIndex == 1 {
      foodName = apiSearchForFoods[indexPath.row].name
    } else {
      foodName = self.favoritedUSDAItems[indexPath.row].name
    }
    
    cell.textLabel?.text = foodName

// MARK: UISearchResultsUpdating
extension ViewController: UISearchResultsUpdating {
  func filterContentForSearch (searchText: String, scope: Int) {
    if scope == 0 {
      self.filteredSuggestedSearchFoods = self.suggestedSearchFoods.filter({ (food: String) -> Bool in
        var foodMatch = food.lowercaseString.rangeOfString(searchText.lowercaseString)
        return foodMatch != nil
      })
    } else if scope == 2 {
      self.filteredFavoritedUSDAItems = self.favoritedUSDAItems.filter({ (item: USDAItem) -> Bool in
        var stringMatch = item.name.lowercaseString.rangeOfString(searchText.lowercaseString)
        return stringMatch != nil
      })
    }
  }
  
  func updateSearchResultsForSearchController(searchController: UISearchController) {
