         if let operation=sender.currentTitle{
             brain.pushOperation(operation)
             
-            historyValue = operation
+            historyValue = (historyValue ?? "") + operation
         }
     }
     

            display.text = (userInMiddleOfTypingNumber ? display.text!+digit : digit)
            userInMiddleOfTypingNumber=true
            
            historyValue = digit
        }
    }
    
    @IBAction func appendFloatingPoint() {
        if display.text!.rangeOfString(".")==nil{
            display.text=display.text!+"."
            historyValue = "."
            userInMiddleOfTypingNumber=true
        }
    }
    
    @IBAction func undoDigit() {
        if var displayString = display.text, var historyString = history.text{
            if(count(displayString)==1)
            {
                displayValue=0

                    display.text="0"
                }
                else{
                    display.text="\(newValue!)"
                }
            }
            userInMiddleOfTypingNumber=false
        }
    }
    
    var historyValue:String?{
        get{
            return history.text
        }
        set{
            if history.text?.rangeOfString("=") != nil || newValue == "" || history.text==nil{
                history.text = ""
            }
            
            history.text = (newValue ?? "")
        }
    }
}
