; but only to the extent the amount of the indebtedness resulting from such refinancing does not exceed the amount of the refinanced indebtedness. (B) Limitation The aggregate amount of indebtedness taken into account under subparagraph (A) for any period shall not exceed $500,000 (half of such amount in the case of a married individual filing a separate return). (C) Treatment of indebtedness incurred on or before November 2, 2017 (i) In general In the case of any pre-November 2, 2017, indebtedness, this paragraph shall apply as in effect immediately before the enactment of the Tax Cuts and Jobs Act . (ii) Pre-November 2, 2017, indebtedness For purposes of this subparagraph, the term pre-November 2, 2017, indebtedness means— (I) any principal residence acquisition indebtedness which was incurred on or before November 2, 2017, or (II) any principal residence acquisition indebtedness which is incurred after November 2, 2017, to refinance indebtedness described in clause (i) (or refinanced indebtedness meeting the requirements of this clause) to the extent (immediately after the refinancing) the principal amount of the indebtedness resulting from the refinancing does not exceed the principal amount of the refinanced indebtedness (immediately before the refinancing). (iii) Limitation on period of refinancing clause (ii)(II) shall not apply to any indebtedness after— (I) the expiration of the term of the original indebtedness, or (II) if the principal of such original indebtedness is not amortized over its term, the expiration of the term of the 1st refinancing of such indebtedness (or if earlier, the date which is 30 years after the date of such 1st refinancing). (iv) Binding contract exception In the case of a taxpayer who enters into a written binding contract before November 2, 2017, to close on the purchase of a principal residence before January 1, 2018, and who purchases such residence before April 1, 2018, subparagraphs (A) and (B) shall be applied by substituting April 1, 2018 for November 2, 2017 . . (2)