Rep. Debbie Dingell, D-Mich., introduced a bill Wednesday that aims to protect future U.S. elections from foreign interference in part by requiring voting machines to produce a paper record of votes cast.

The bill, called the Safeguarding Election Infrastructure Act of 2017, gives states resources to protect electronic voting systems from security breaches and updates election infrastructure.

“Our democracy depends on free and fair elections, and we must do everything we can to protect the security and integrity of that process,” Dingell said in a statement. ‘The reality is, many of our voting machines have not been updated in nearly two decades and are susceptible to cyberattacks. We know that foreign adversaries pay very close attention to our elections, and until we address these vulnerabilities, our democratic process is at risk.”

Dingell’s bill would allow state and local election officials to obtain the necessary security clearances to receive information from federal agencies related to their voting systems.

The legislation would also require voting systems to produce a verified paper record of votes cast in federal elections that can be audited by election officials, and establishes a federal grant program to help states upgrade their voting machines.

In the event the winner of a federal election receives less than 59 percent of the vote, Dingell’s bill triggers an audit of election results using a random sample of paper ballots.

The Department of Homeland Security told election officials in 21 states Russian cyber actors attempted to breach their elections systems in an effort to obtain voter registration databases.

In most cases, though, the attempted hacks were unsuccessful.

Dingell’s bill isn’t the first that aims to protect state voting systems from cyber intrusions.

Sens. Martin Heinrich, D-N.M., and Susan Collins, R-Maine, introduced legislation last month that sets up federal grants for states to upgrade their voting systems and improve information-sharing between state election officials and the federal government related to threats to voting systems.