         var currentText = resultLabel.text!
         
         if currentText.characters.count == 1 {
-            if currentText != "0" {
-                resultLabel.text = "0"
+            if currentText != zero {
+                resultLabel.text = zero
             }
         } else {
             currentText.remove(at: currentText.index(before: currentText.endIndex))

        let inputText = sender.titleLabel!.text!
        var currentText = resultLabel.text!
        
        if currentText == "0" || (previousValue != nil && currentValue == nil) {
            currentText = inputText
        } else {
            currentText = currentText + inputText

    }
    
    @IBAction func onEqualsTapped() {
        guard let solution = solveEquation() else {
            return
        }
        
        if solution.truncatingRemainder(dividingBy: 1) == 0 {
            resultLabel.text = String(Int(solution))
        } else {
            resultLabel.text = String(solution)
        }
        
        previousValue = solution
        currentValue = nil
    }
    
    func solveEquation() -> Double? {
        guard let firstValue = previousValue, secondValue = currentValue, solutionOperator = currentOperator else {
            return nil
        }
        
        switch solutionOperator {
        case plus:
            return firstValue + secondValue
        case minus:
            return firstValue - secondValue
        case multiply:
            return firstValue * secondValue
        case divide:
            return firstValue / secondValue
        default:
            return nil
        }
    }
}
