         
         return results as? [KivaLoan] ?? [KivaLoan]()
     }
+    
+    // MARK: Helper
+    func showNoMoreResultsAlert() {
+        
+        let title = "No More Loans"
+        var message = "No additional loans are available"
+        if let countryName = self.country?.name {
+            message = "No additional loans are available in \(countryName)."
+        }
+
+        let alertController = UIAlertController(title: title, message: message, preferredStyle: .Alert)
+        let okAction = UIAlertAction(title: "OK", style: UIAlertActionStyle.Default) {
+            UIAlertAction in
+            // handle OK pressed in alert controller
+        }
+        
+        alertController.addAction(okAction)
+        self.presentViewController(alertController, animated: true, completion: nil)
+    }
+    
 }
 


        self.activityIndicator.startActivityIndicator(tableView)
        
        // initialize user's loans
        refreshLoans(nil)
        


    func refreshLoans(completionHandler: ((success: Bool, error: NSError?) -> Void)? ) {
        
        guard nextPageOfKivaSearchResults != -1 else {
            showNoMoreResultsAlert()
            return
        }
        
        // Search Kiva.org for the next page of Loan results.
        CountryLoansKivaApiHelper.populateLoansForCountry(LoansTableViewController.KIVA_LOAN_SEARCH_RESULTS_PER_PAGE, twoLetterCountryCode: self.country?.countryCodeTwoLetter, nextPage: self.nextPageOfKivaSearchResults) {
            success, error, loans, nextPage in
