residence for any period of time, no deduction shall be allowed for expenses paid or incurred by such individual with respect to renting, during such period of time, such qualified residence. (i) Application of credit with respect to owner-Occupied rehabilitations (1) In general In the case of a qualified rehabilitation by the taxpayer of any qualified residence which is owned (as of the date that the written binding contract referred to in paragraph (3) is entered into) by a specified homeowner, the rules of paragraphs (2) through (7) shall apply. (2) Alternative credit determination In the case of any qualified residence described in paragraph (1), the neighborhood homes credit determined under subsection (a) with respect to such residence shall (in lieu of any credit otherwise determined under subsection (a) with respect to such residence) be allowed in the taxable year during which the qualified rehabilitation is completed (as determined by the neighborhood homes credit agency) and shall be equal to the least of— (A) the excess (if any) of— (i) the amounts paid or incurred by the taxpayer for the qualified rehabilitation of the qualified residence to the extent that such amounts are certified by the neighborhood homes credit agency (at the time of the completion of such rehabilitation) as meeting the standards specified pursuant to subsection (f)(1)(C), over (ii) any amounts paid to such taxpayer for such rehabilitation, (B) 50 percent of the amounts described in subparagraph (A)(i), or (C) $50,000. (3) Qualified rehabilitation (A) In general For purposes of this subsection, the term qualified rehabilitation means a rehabilitation or reconstruction performed pursuant to a written binding contract between the taxpayer and the specified homeowner if the amount paid or incurred by the taxpayer in the performance of such rehabilitation or reconstruction exceeds the dollar amount in effect under subsection (b)(3)(A). (B) Application of limitation to expenses paid or incurred after allocation A rule similar to the