 
 extension GifSearchViewController: UISearchBarDelegate {
     
+    func searchGif(timer: NSTimer) {
+        let term = timer.userInfo!["searchText"] as! String
+        if term.characters.count >= 3 {
+            AXCGiphy.searchGiphyWithTerm(term, limit: 10, offset: 0, completion: updateSearchResults)
+        }
+    }
+    
     func searchBarTextDidBeginEditing(searchBar: UISearchBar) {
         searchBar.setShowsCancelButton(true, animated: true)
     }

    }
    
    func searchBar(searchBar: UISearchBar, textDidChange searchText: String) {
        AXCGiphy.searchGiphyWithTerm(searchText, limit: 10, offset: 0, completion: updateSearchResults)
    }
}

// MARK: Collection View Delegate

    @IBOutlet weak var collectionView: UICollectionView!
    
    var searchResults: [AXCGiphy]?
    var debounceTimer: NSTimer?
    
    override func viewDidLoad() {
        super.viewDidLoad()
