     
     // MARK: - Private properties
     
-    var viewModel: RedditTopListingViewModel!
+    fileprivate var viewModel: RedditTopListingViewModel!
     
     // MARK: - Lifecycle
     

    func bind(viewModel: RedditTopListingViewModel) {
        self.viewModel = viewModel
        self.viewModel.dataSource.delegate = self
    }
    
}

    
    func dataSourceDidFinishLoadingData(_ dataSource: RedditTopListingDataSource) {
        tableView.reloadData()
        refreshControl?.endRefreshing()
    }
    
    func dataSource(_ dataSource: RedditTopListingDataSource, didFinishWithError error: RedditError) {
        refreshControl?.endRefreshing()
        
        let alert = UIAlertController(title: "Error",
                                      message: error.localizedDescription,
                                      preferredStyle: UIAlertControllerStyle.alert)
