     
     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 {

        }
    }
    
    private func numberContainsDecimal(digit: String) -> Bool {
        return digit == decimal && display.text!.characters.contains(Character(decimal))
    }
    
    private func isDoubleAnInteger(num: Double) -> Bool {
        return num.truncatingRemainder(dividingBy: 1.0) == 0.0
    }
