             // Dismiss current banner, if any
             banner?.dismiss()
             banner = nil
-            // Dismiss current activity indicator, if any
-            activityIndicator?.stopAnimating()
-            activityIndicator = nil
+            // Dismiss current loading indicator, if any
+            loadingIndicator?.removeFromSuperview()
+            loadingIndicator = nil
 
             switch reachability.connection {
             case .none:

        banner?.dismiss()
        banner = nil
        // Remove activity indicator
        activityIndicator?.stopAnimating()
        activityIndicator = nil
    }

    override func viewWillAppear(_ animated: Bool) {


// MARK: DZN Empty Data Set Source
extension HomeViewController: DZNEmptyDataSetSource, DZNEmptyDataSetDelegate {
    func verticalOffset(forEmptyDataSet scrollView: UIScrollView) -> CGFloat {
        return -80
    }

    func image(forEmptyDataSet scrollView: UIScrollView) -> UIImage? {
        if loadingIndicator != nil {
            return nil
        }
        return isNetworkDown ? #imageLiteral(resourceName: "noInternet") : #imageLiteral(resourceName: "emptyPin")
    }

    func description(forEmptyDataSet scrollView: UIScrollView) -> NSAttributedString? {
        if loadingIndicator != nil {
            return nil
        }
        let title = isNetworkDown ? "No Network Connection" : "Location Not Found"
        let attrs = [NSAttributedString.Key.foregroundColor: UIColor.mediumGrayColor]
        return NSAttributedString(string: title, attributes: attrs)
    }

    func buttonTitle(forEmptyDataSet scrollView: UIScrollView, for state: UIControl.State) -> NSAttributedString? {
        if loadingIndicator != nil {
            return nil
        }
        let title = "Retry"
        let attrs = [NSAttributedString.Key.foregroundColor: UIColor.tcatBlueColor]
        return NSAttributedString(string: title, attributes: attrs)
    }

    func setUpLoadingIndicator() {
        loadingIndicator = LoadingIndicator()
        if let loadingIndicator = loadingIndicator {
            view.addSubview(loadingIndicator)
            print("added loading indicator")
            loadingIndicator.snp.makeConstraints { (make) in
                make.centerX.equalToSuperview()
                make.centerY.equalToSuperview()
                make.width.equalTo(40)
                make.height.equalTo(40)
            }
        }
    }

    func emptyDataSet(_ scrollView: UIScrollView!, didTap didTapButton: UIButton!) {
        setUpLoadingIndicator()
        if let loadingIndicator = loadingIndicator {
            tableView.reloadData()

            // Have loading indicator time out after one second
            let delay = 1
            DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(delay)) {
                // if the empty state is the "Location Not Found" state, clear the text in the search bar
