Illegal immigration has long been a problem in America, but a surprisingly large factor in illegal immigration is the problem of legal visitors overstaying their visas.

It turns out that visa overstays account for an estimated 40 percent of all illegal immigration in the United States.

According to the Department of Homeland Security’s recently issued “Entry/Exit Overstay Report,” 628,799 legal immigrants overstayed their visas in fiscal year 2016. Of that number, 544,676 are still believed to be in the United States, meaning only 84,123 of those who initially overstayed ended up leaving the country.

This is obviously a problem that must be rectified. The Department of Homeland Security and Congress need to begin implementing cost-effective solutions to curtail visa overstays and restore the integrity of our immigration system.

In the Homeland Security report, a suspected in-country overstay is defined as a nonimmigrant who lawfully enters the U.S. but remains beyond their allotted period of admission, and for whom there is no record of departure.

The January overstay figure—544,676—is equal to an overstay rate of 1.07 percent for 2016. By comparison, in 2015 there were 416,500 overstays, amounting to a rate of 0.9 percent.

Beyond just the top-level numbers, different groups are more or less likely to be visa overstays.

For countries participating in the Visa Waiver Program, the overstay rate was 0.6 percent of the 21,616,034 expected departures. For all other countries, the overstay rate was 1.90 percent out of 13,848,480 who were expected to depart.

The overstay rate among students and exchange visitors was particularly high, at 5.48 percent out of a total of 1,457,556 visitors.

The U.S. currently has biometric and biographic entry requirements that are critical for U.S security.

When a visitor enters the U.S. through an air or sea port of entry, their biometric and biographic information is analyzed across intelligence and law enforcement databases to ensure they are not a threat.

Customs and Border Protection officers collect biographic information like name, country of origin, and passport information, while also collecting biometric data such as fingerprint, facial, or iris scans, though fingerprints are by far the most common.

When they leave, Homeland Security uses biographic information to confirm an individual’s identity, though it is struggling to implement a biometric system.

This is because it is a costly program to implement and it requires vast changes to airports, sea ports, and land ports across the U.S.

Further, biometric systems do not stop someone from overstaying their visa. Because the biometric exit technology is by definition located at the border or airports, and overstays do not cross the border or board an airplane to leave, the technology is left unused.

Thus, from an immigration enforcement perspective, a biometric exit system does little more than an effective biographic exit system.

Instead of funding this costly biometric exit system program, Congress and Homeland Security should redirect those funds to hire new Immigration and Customs Enforcement prosecutors and agents.

With increased numbers, ICE can locate overstayed visitors within the United States and remove them. Additionally, these extra funds can be used to supply and increase support for the 287(g) program that enlists the help of state and local authorities in enforcing federal immigration statutes.

The Homeland Security overstay report indicates that more needs to be done to prevent illegal immigration. By pursuing cost-effective solutions, the U.S. can tame this problem before it grows even worse.