NOTES TO CONDENSED CONSOLIDATED FINANCIAL STATEMENTS – (Continued)
Mortgage and Loans Payable
As of September 30, 2018 and December 31, 2017, the Company's mortgage and loans payable consisted of the following (in thousands):
December 31, 2017
Mortgage payable and loans payable
Less amount representing unamortized debt discount and debt issuance cost
Add amount representing unamortized mortgage premium
Less current portion
JPY Term Loan
On July 26, 2018, the Company entered into an amendment to its existing credit agreement, dated as of December 12, 2017. The amendment provided for a senior unsecured term loan in an aggregate principal amount of ¥47.5 billion (the "JPY Term Loan"). The Company is required to repay the JPY Term Loan at the rate of 5% of the original principal amount per annum with the remaining balance to be repaid in full on December 12, 2022. The JPY Term Loan bears interest at a rate based on LIBOR plus a margin that can vary from 1.00% to 1.70% and contains customary covenants consistent with the existing credit agreement.
On July 31, 2018, the Company drew down the full ¥47.5 billion of the JPY Term Loan, or approximately $424.7 million at the exchange rate effective on July 31, 2018, and prepaid the remaining principal of its existing Japanese Yen Term Loan of ¥43.8 billion or approximately $391.3 million. In connection with this prepayment of its existing Japanese Yen Term Loan, the Company recognized a loss on debt extinguishment of $2.2 million for the three months ended September 30, 2018. As of September 30, 2018, total outstanding borrowings under the JPY Term Loan were ¥47.5 billion, or approximately $418.0 million at the exchange rate effective on that date. As of September 30, 2018, debt issuance costs, net of amortization, related to the JPY Term Loan were $4.5 million at the exchange rate in effect on that date.