Exxon Mobil, the oil producer that traces its roots to John D. Rockefeller, and Chevron garnered a combined $8 billion benefit at the end of 2017 from a Republican-led overhaul of the U.S tax code.

The energy companies join an array of S&P 500 stalwarts reporting billions in one-time benefits from the bill, which lowered the top corporate rate to 21 percent from 35 percent and created a territorial tax system that will halt the application of U.S. levies to profits earned and taxed overseas, then brought back to the country.

Even companies that took hefty charges due to low-profile provisions of the law, like Citigroup, have expressed optimism about its long-term benefits and outlined plans to invest more in expansion or return cash to their shareholders.

“The reform will make the investment climate more attractive,” Jeffrey Woodbury, Exxon’s vice president of investor relations, said on an earnings call Friday. “It will lead to things like capital inflow, improved profitability, new jobs, ultimately higher returns for savings plans.”

His company reported a $5.9 billion tax-reform benefit on Friday, boosting net income for the three months through December to $8.38 billion, or $1.97 a share, a five-fold increase from a year earlier.

The Irving, Texas-based business plans to invest $50 billion on expansion and plant improvements over five years, boosting oil production in western Texas and New Mexico while creating thousands of additional jobs.

Rival Chevron, based in San Ramon, Calif., garnered a $2.02 billion quarterly benefit from the tax overhaul, driving net income to $3.12 billion, or $1.64 a share. Revenue climbed 19 percent to $36.4 billion.