             success: { [weak self] tags in
                 guard let strongSelf = self else { return }
                 strongSelf.refreshControl.endRefreshing()
-                
+
                 strongSelf.persistenceCentral.deleteTags(in: strongSelf.category!)
                 let manager = strongSelf.persistenceCentral.coreDataStackManager
-                
+
                 let mappedTags = FlickrTag.map(on: tags,
                                                with: strongSelf.category!,
                                                in: manager.managedObjectContext)
                 manager.saveContext()
                 strongSelf.tags = mappedTags
-                
+
                 strongSelf.setUIState(.successDoneWithDownloading)
         }) { [weak self] error in
             self?.refreshControl.endRefreshing()

    
    convenience init(flickrApiClient: FlickrApiClient, period: Period, category: Category) {
        self.init(nibName: TagListViewController.nibName, bundle: nil)
        self.flickrApiClient = flickrApiClient
        self.period = period
        self.category = category
    }
    
    // MARK: - Private
    
    fileprivate func setup() {
        configureUI()
        if tags.count == 0 {
            fetchData()
        }
    }
    
    @objc func fetchData() {
        setUIState(.downloading)
        flickrApiClient.getTagsHotList(
            for: period,

                "Number of Tags",
                rows: 200,
                initialSelection: self.numberOfTags-1,
                doneBlock: { [weak self] (_, selectedValue) in
                    self?.numberOfTags = selectedValue
                    self?.fetchData()
                },
                cancelBlock: nil
            )
        }))
