; (B) by striking the net benefit and inserting the cost associated with the benefit ; and (C) by striking Such payment may consist in whole or in part of materials and labor furnished by the railroad in connection with the construction of such project. ; (5) by striking subsection (e) and inserting the following: (e) Railway crossings (1) Eligible activities Funds apportioned to a State under section 104(b)(7) may be obligated for the following: (A) The elimination of hazards at railway-highway crossings, including technology or protective upgrades. (B) Construction (including installation and replacement) of protective devices at railway-highway crossings. (C) Infrastructure and noninfrastructure projects and strategies to prevent or reduce suicide or trespasser fatalities and injuries along railroad rights-of-way and at or near railway-highway crossings. (D) Projects to mitigate any degradation in the level of access from a highway-grade crossing closure. (E) Bicycle and pedestrian railway grade crossing improvements, including underpasses and overpasses. (F) Projects eligible under section 22907(c)(5) of title 49, provided that amounts obligated under this subparagraph— (i) shall be administered by the Secretary in accordance with such section as if such amounts were made available to carry out such section; and (ii) may be used to pay up to 90 percent of the non-Federal share of the cost of a project carried out under such section. (2) Special rule If a State demonstrates to the satisfaction of the Secretary that the State has met all its needs for installation of protective devices at railway-highway crossings, the State may use funds made available by this section for other highway safety improvement program purposes. ; (6) by striking subsection (f) and inserting the following: (f) Federal share Notwithstanding section 120, the Federal share payable on account of any project financed with funds made available to carry out subsection (e) shall be up to 90 percent of the cost thereof.