     
     private func appendDigits(_ digit: String) {
         if userInMiddleOfTyping {
-            if digit == decimal && display.text!.characters.contains(Character(decimal)) {
+            if numberContainsDecimal(digit: digit) {
 //                don't do anything
             } else {
                 display.text! += digit

class ViewController: UIViewController {
    @IBOutlet private weak var display: UILabel!
    @IBOutlet private weak var renderEquation: UILabel!
    private var userInMiddleOfTyping = false
    private var model = CalculatorModel()
    private var decimal = "."
    
    private var displayValue: Double {

        let digit = sender.currentTitle!
    
        appendDigits(digit)
        userInMiddleOfTyping = true
    }

