         }
     }
     
+    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
     }

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

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

