         progressbar.titles = ["Step 1".localized, "Step 2".localized, "Step 3 step again".localized,]
     }
     
+    // MARK: Misc
+    func updateButtons(_ currentTab: Int) {
+        nextButton.isEnabled = currentTab < progressbar.titles.count
+        prevButton.isEnabled = currentTab > 0
+        progressbar.currentTab = currentTab
+        progressbarWithImages.currentTab = currentTab
+        currentTabLabel.text = "\(currentTab)"
+    }
+    
+    // MARK: lifecycle
     override func viewDidLoad() {
         super.viewDidLoad()
         configureTitleProgressBar()

        tab -= 1
        updateButtons(tab)
    }

    func updateButtons(_ currentTab: Int) {
        nextButton.isEnabled = currentTab < progressbar.titles.count
        prevButton.isEnabled = currentTab > 0
        progressbar.currentTab = currentTab
        progressbarWithImages.currentTab = currentTab
        currentTabLabel.text = "\(currentTab)"
    }
}


        updateButtons(0)
    }

    // MARK: button actions
    @IBAction func next(_ sender: AnyObject) {
        var tab = progressbar.currentTab
        tab += 1
