America historically has tended to take a careless attitude toward immigration, citizenship, and residency, and for the most part that approach has worked. Immigrants were among those who responded when a young nation needed pioneers and settlers to improve the land. With their implements, tools, and knowledge, they tended to be an independent, self-sufficient lot. But times change, and the frontier was officially closed in 1890. The economics of today are nearly a century removed from those of the prairie days.

Joining factor markets in commodities such as oil, raw materials, and steel creates net gains to the system, which is why economists favor free trade. If labor were solely a commodity, this would be true of labor also. But labor involves people. These people bring their own political attitudes, cultures, voting tendencies, family concerns, education, health issues, and need for entitlements. And, yes, immigrant entrants to our labor market can bring with them the scourges of human trafficking, gang activity, and crime if not properly screened.

Consider voting behavior. If I entered a country and believed that merely by voting, I could have free education for my children, free college for my teenagers, and free money to subsidize my food and housing, I would be foolish indeed not to vote for politicians who promised these goods. Nancy Pelosi and Chuck Schumer would be foolish indeed not to notice that by favoring the interests of aliens, they might guarantee themselves votes. A careless system can work against its own interests. Tilting the U.S. toward socialism makes it a very different place, for example, whereas importing steel or oil does not.

Adequate screening of immigrants and the construction of a border wall are obvious policy directives, but they are only the beginning. If the U.S. is to avoid further carelessness, what needs to change? First, it should be self-evident that while God may love each immigrant equally, we cannot take all. Therefore, we must welcome only those with the best capacity to contribute to the U.S. more than they draw from it.

Second, since authority rests with Congress to regulate residency and citizenship, it must act to end the present confusion on citizenship. After the Civil War, some felt that there needed to be written into the Fourteenth Amendment constitutional grounding for the Civil Rights Act of 1866, which gave citizenship to former slaves. The Act read:

“All persons born in the United States and not subject to any foreign power, excluding Indians not taxed, are hereby declared to be citizens of the United States: and such citizens of every race and color, without regard to any previous condition of slavery or involuntary servitude…shall have the same right, in every State and Territory in the United States…to full and equal benefit of all laws…as is enjoyed by white citizens…”

The issue for former slaves was their status as legal residents, having no citizenship in or allegiance to any foreign power, having been born in the U.S. to parents with no foreign citizenship or allegiance to any foreign power, and yet not being U.S. citizens themselves. The Civil Rights Act of 1866 rectified this indeterminate status, and the Fourteenth Amendment provided constitutional grounding, though with an unfortunate and thought-to-be-harmless rewording of the phrase “and not subject to any foreign power.” This turn of phrase created renewed confusion as to the conferring of citizenship upon those born in the U.S. This is illustrated by the fact that some go so far as to believe that if an invading hostile group forced its way into the U.S. accompanied by their pregnant women who gave birth during the incursion, the U.S. would naturally have to grant citizenship to their babies.

So while enhanced border security is a must, the next crucial step is that Congress clearly define citizenship. It should also conduct random audits of residents asking them for proof of legal inhabitance. Random audits are fair, and unlike IRS tax audits, would need to be done only once in a lifetime. Once one’s legal status is determined, voting and other rights can be regularized. Needs change with the times, and we are no longer a nation of pioneers. U.S. policy should reflect that.

Earl Grinols is a distinguished professor of economics at Baylor University.