Forty Republican representatives who voted for the American Health Care Act held shares in health-care companies valued at $23 million and earned more than $2 million off those investments, a Daily Beast review of the most-recent financial records found.

The investments may be valued at as high as $39 million and took in as much as $6 million in profits, according to the disclosure reports that require members of Congress to report investments and income within a certain price range.

Several Republicans with key roles in passing the bill held more than $500,000 in medical company shares.

The majority of the companies in which lawmakers own stock represent the giants of the pharmaceutical and medical-device industries. Republicans owned between $1.3 million and $4.9 million in shares of Abbott Labs, Johnson & Johnson, and 3M, three of the country’s largest medical-device manufacturers. They also owned between $2.7 million and $5.5 million in pharmaceutical giants Merck, Pfizer, Bristol-Myers Squibb, Pfizer, and Shire.

The AHCA would benefit these companies by eliminating billions of dollars in taxes and fees on pharmaceutical and medical-device manufacturers—a provision of the bill that doesn’t reflect a violation of ethics rules because it will have a broad effect across health-care industries, ethics experts said.

The remaining 174 representatives who voted for the AHCA did not own any shares in health-care companies, The Daily Beast’s review found. The most recent data is from 2015. Disclosure reports for 2016 were due last week and are not yet fully available.

“As an objective matter, it seems like an awful lot of money in one industry that has a lot of regulation and that these members are directly dealing with legislation on,” said Larry Noble, a former Federal Elections Commission lawyer who now works for the Campaign Legal Center.

The tens of millions in investments are far from illegal, said Richard Painter, the lead ethics lawyer in George W. Bush’s White House, but raise conflict of interest concerns.

“Knowing that health care is so sensitive, and that one of the core issues in the debate is how much money is going to the companies and how much is going to patient care, I think this shows lack of sensitivity by members of Congress to be going and investing heavily into these companies,” Painter told The Daily Beast. “I think they’re arrogant and they don’t understand that the public is sick and tired of this problem.”

Among the influential members with significant investments is Rep. Thomas MacArthur of New Jersey, who held between $834,000 and $2.3 million in health-care company investments in 2015. MacArthur made between $142,000 and $472,000 in capital gains and dividends on those investments, according to his disclosure forms.

MacArthur authored an amendment to the AHCA that allows insurance companies to deny coverage to some people with pre-existing conditions. The amendment won over critical support from the right-wing Freedom Caucus, allowing the bill to narrowly pass the House. MacArthur ranks seventh among the 40 AHCA supporters who owned the most health-care stock.

Rep. Chris Collins of New York holds the most investments, with $6.5 million in stock in two medical-device companies, ZeptoMetrix and Audubon Machinery Corp. Collins serves as a director at ZeptoMetrix and is one of the founders of Audubon Machinery. (The Office of Government Ethics is investigating Collins’ investments in an Australian pharmaceutical company.) The New York congressman was responsible for an amendment in the AHCA that requires states to pay more into Medicaid at the expense of counties, saving rural areas like his native Buffalo millions of dollars.

Collins’ amendment flipped at least one “no” vote to a “yes,” when Rep. Claudia Tenney of New York announced her support in March.

Another influential Republican with significant investments is Rep. Fred Upton of Michigan, who holds between $400,000 and $700,000 in health-care shares. Upton wrote an amendment providing up to $8 billion for states to fund “high-risk pools” for patients with pre-existing conditions. Upton’s amendment eased fears that MacArthur’s amendment would make it impossible for such patients to buy insurance. The $8 billion Upton proposed won’t be nearly enough to pay for all the necessary care, industry analysts say, but it was enough to push the AHCA over the finish line.

Besides MacArthur, Collins, and Upton, the other lawmakers with at least $500,000 in health-care company shares are: Rep. Michael McCaul of Texas (at least $6 million); Rep. Rodney Frelinghuysen of New Jersey (at least $2.2 million); Rep. James Sensenbrenner of Wisconsin (at least $2.1 million); Rep. Keith Rothfus of Pennsylvania (at least $1.2 million); Rep. Kenny Marchant of Texas (at least $922,000); Rep. James Renacci of Pennsylvania (at least $663,000); and Rep. Rod Blum of Iowa (at least $531,000).

Eighteen pro-AHCA representatives held at least $10,000 in health-care investments in 2015; the remaining 12 held at least a single dollar’s worth of investments.

Staff of several of the representatives did not reply to questions for this story. Camille Gallo, spokesperson for Rep. MacArthur, provided the following statement:

“Congressman MacArthur has divested from all holdings in companies that are affected by his committee appointments. This is not required, nor was he asked to do so. Anyone who is alleging that Tom entered public service to make money is embarrassing themselves and needs to find a new witch to hunt.”

Gallo did not say whether MacArthur has consulted ethics officials regarding his significant health-care investments and large role in the AHCA, something both Noble and Painter say should occur for all members of Congress who are doing more than simply voting on legislation.

A spokesperson for McCaul said that the congressman “has zero participation or knowledge of the transactions” made as part of his millions of dollars in health-care investments, which are held mostly in family trusts controlled by McCaul’s wife, who is the daughter of the billionaire head of Clear Channel Communications.

“He is legally precluded from having any involvement or knowledge of the specific investment decisions made with regard to securities listed as his wife’s separate property, which are disclosed in his annual personal financial disclosure,” spokesperson Lizzie Litzow said of McCaul.

Spokespeople for Renacci and Upton said their investments are similarly controlled as part of family trusts or managed portfolios. A spokesperson for Sensenbrenner said his investments are “irrelevant to his vote to repeal and replace Obamacare, a disastrous law that he has opposed since it was signed into law—long before specific details of its replacement were released.” A spokesperson for Rothfus said his vote on the AHCA and other bills are “wholly compliant with the requirements of House ethics rules.”

Michael Kracker, a spokesperson for Collins, blamed “partisan attacks” for scrutiny of his investments.

“Congressman Collins has followed all congressional ethical guidelines related to his personal finances during his time in the House and will continue to do so,” Kracker said in a statement.

Spokespersons for Frelinghuysen, Blum, and Marchant did not respond to requests for comment.

Members of Congress aren’t expressly prohibited from owning stocks in individual companies, Painter said, unlike employees of federal agencies and members of the Executive Branch. As a White House ethics lawyer, Painter said he routinely advised aides and other employees of the Executive Branch to either completely divest from investments in individual companies or shift their assets to diversified mutual funds in order to comply with ethics rules.

“I don’t understand why members of Congress don’t do that,” Painter said. “The bottom line is that these folks are supposed to be in Congress to represent their constituents, not maximize their wealth. It’s fine if you want to be a stock picker, but go be a stock picker, not a member of Congress.”

—with additional reporting by Sarah Bertness