         
     }
     
-    private func getCurrencyRecord(currencyCode: String) -> (name: String, code: String, rate: Double, locale: String?, symbol: String?)  {
+    private func getCurrencyRecord(currencyCode: String) -> (name: String, code: String, rate: Double, locale: String?, symbol: String?, decimals: Int)  {
         
         // CoreData setup.
         let managedObjectContext: NSManagedObjectContext!


    func inputValue() -> String {
        let inputValue: Double = input
        return convertToCurrency(inputValue, code: inputCurrency.code, locale: inputCurrency.locale, symbol: inputCurrency.symbol)
    }

    func outputValue() -> String {
        let outputValue: Double = convertToOutputCurrency(input)
        return convertToCurrency(outputValue, code: outputCurrency.code, locale: outputCurrency.locale, symbol: outputCurrency.symbol)
    }
    
    func convertToInputCurrency(number: Double) -> Double {

class Converter {

    var input: Double
    var inputCurrency:(code: String, rate: Double, locale: String?, symbol: String?, decimals: Int)
    var outputCurrency:(code: String, rate: Double, locale: String?, symbol: String?, decimals: Int)
    
    init() {
        input = 0
