beginning after the qualified facility is placed in service. (C) Method of allocation The Secretary shall prescribe regulations for ensuring proper allocation of amounts under subparagraph (A). (2) Qualified facility (A) In general The term qualified facility means any nonresidential building (and its structural components) which— (i) prior to 2000, was placed in service and used in the active conduct of a trade or business by a person other than the qualified taxpayer, (ii) after being acquired by the qualified taxpayer, has been substantially rehabilitated, (iii) during the 2-year period prior to commencement of rehabilitation by the qualified taxpayer, was not used in the active conduct of a trade or business, and (iv) is located within a State. (B) Substantial rehabilitation For purposes of this paragraph, a building shall be deemed to have been substantially rehabilitated only if— (i) not less than 50 percent of the existing external walls of such building are retained in place as external walls, (ii) not less than 75 percent of the existing internal structural framework of such building is retained in place, and (iii) the amount properly chargeable to the capital account for any addition to or improvement of the building is in excess of an amount equal to the greater of— (I) the adjusted basis of such building (and its structural components), or (II) $20,000. (3) Qualified taxpayer The term qualified taxpayer means the person that owns the qualified facility and directly incurs not less than 50 percent of the expenses for substantially rehabilitating such facility (under rules similar to the rules applicable to self-rehabilitated buildings under section 47(d)(4)). (4) State The term State means any State of the United States or the District of Columbia or any Territory or possession of the United States. (5) W– 2 Wages (A) In general The term W–2 wages means, with respect to any person for any taxable year of such person, the amounts described in paragraphs (3) and (8) of section 6051(a) paid by such