 
 extension Mortgage {
   func next(extraPayment: Float) -> MortgagePayment {
-    let requiredPayment = requiredMonthlyPayment()
+    let requiredPayment = requiredMonthlyPayment
     if (requiredPayment > balance) {
       return MortgagePayment(principal: balance, interest: 0)
     }


class Mortgage {
    let yearlyInterestRate: Float
    var monthlyInterestRate: Float {
        return yearlyInterestRate / 12
    }
    let years: Int
    var months: Int {
        return years * 12
    }
    let amount: Float
    var balance: Float
    var actualInterestPaid: Float




let mortgage = Mortgage(amount: amount, years: durationInYears, yearlyInterestRate: interestRatePercentage)
print("Your monthly payment will be \(currencyFormatter.string(from: mortgage.requiredMonthlyPayment)) \n")


let totalInterestPaid = mortgage.theoricalTotalInterestPaid()
