(CNN) I did not arrive in America as a refugee or to join family already here. I owe the start to my life in this country to two things: my father's brilliant mind and a very special document.

Daddy was a statistician renowned in his field of probability theory, and in 1975, Florida State University offered him a teaching position. We flew across the globe on Indian passports and gained entry into America with a visa called H-1, reserved for people such as my father who possessed distinctive skills.

We later applied for permanent residency, my father went on to become a professor emeritus at FSU and in 2008, I proudly became a US citizen

The H-1 visa was designed to attract smart people who were considered the best and the brightest of global talent to fill the gaps in the US workforce. I am a direct beneficiary of that program. Without it, my own trajectory would have been very different.

In 1990, the visa was reinvented as H-1B, and it boomed alongside the rise of Silicon Valley. Most H-1Bs are awarded to technology workers, though other fields such as science and medicine also benefit. And these days, almost 70% of the visas are awarded to Indian nationals.

Without the H-1B program, argue its supporters, innovation is sure to suffer and America stands to lose its competitive edge. Look at any number of start-ups, and you're sure to find talented folks who reached America on an H-1B. Among that elite group is Mike Krieger , one of the founders of Instagram.

But in recent years, abuses and fraud in America's largest guest worker program have surfaced. And now with Donald Trump in the White House, H-1B is facing fresh scrutiny.

In April, Trump signed a "Buy American and Hire American" executive order that is part of his ambitious plan to restore 25 million American jobs. The President blames H-1B visa holders for stealing US jobs, and his order takes aim at the program. The visas, he said, "should never, ever be used to replace Americans."

The criticism fits neatly into prevailing anti-immigrant rhetoric, even though H-1Bs are not for immigrants. And to be clear, many H-1B opponents say they don't support building walls or taking other measures to keep foreigners out.

I read Trump's harsh words and wondered: How could a visa responsible for my own family's success come under so much fire? When did a perfectly legitimate guest worker system become so controversial? Who wins? Who loses? Has it really become bad for America?

Intrigued, I decided to learn more about the H-1B visa.

My conversations led me to other Indian Americans, and some of their comments surprised me. I reached out to a congressman from Silicon Valley, a CEO of a tech company who refuses to hire H-1B workers, and a technology worker who lost a fulfilling job and is running for Congress to change the system. I even spoke with an H-1B worker from my native India whose story I found heartbreaking.

I learned there were no simple answers to my questions. What I do know is the H-1B visa has become a document coveted by thousands around the globe -- and reviled by just as many in the United States.

A losing lottery?

To understand how the H-1B visa system works, I called one of the nation's foremost experts on the subject: Ronil Hira.

Hira, an associate professor of public policy at Howard University, t estified last year before the Senate Judiciary Committee on the impact of H-1B workers. He began with his personal story, one that is not unlike mine.

He was the son of immigrants who left India in the 1950s to seek a better life. His wife's family also arrived in the United States on the same H-1 visa program as my father.

The idea behind H-1B is the same as it was when my father obtained his H-1. It's still employer-sponsored and temporary -- the H-1B is good for three years and is extendable for another three. After that, the holder has to return home unless the employer sponsors him or her for permanent residency -- better known as a green card.

Each year, US Citizenship and Immigration Services issues 65,000 H-1B visas to applicants with bachelor's degrees for "specialty occupations." Another 20,000 are set aside for those with master's degrees or higher from a US university.

JUST WATCHED H-1B visas by the numbers Replay More Videos ... MUST WATCH H-1B visas by the numbers 01:16

Those caps, mandated by Congress, were as high as 195,000 in the early 2000s, and many in the tech industry would like to see them rise again.

"The single stupidest policy in the entire American political system was the limit on H-1B visas," Eric Schmidt, executive chairman of Google's parent company Alphabet, recently told an MIT audience. "A properly run company is really about having the best people."

The demand for the visas remains high and the competition, intense.

This year, on the morning of April 1, the first-come, first-served application process opened like the gates to a horse race. Four days later, it was over. The USCIS had received 199,000 visa petitions from employers -- way more than enough to meet the statutory caps.

Because of the high number of applications, the visas are then allotted by lottery.

That's where the trouble begins. If the intent is to get the highest-skilled workers to fill "specialty occupations," why is the government using an arbitrary method such as the lottery? Although everyone in the lottery is theoretically qualified, chances are some better-qualified applicants will lose out to those with less skill and experience.

Another problem: Employers are supposed to seek a foreign worker only when they cannot find a qualified American for the job. But that's not how it works, Hira tells me.

Large firms unfairly snag a chunk of H-1B visas by flooding the application pool. They include familiar names such as Google, Microsoft and Apple, but the biggest recipients are outsourcing companies like Cognizant and Accenture and Indian giants Infosys and Tata Consultancy Services, the two top recipients of H-1B visas.

Employers must make a good-faith effort to recruit an American worker for a position before seeking an H-1B visa, but they don't have to document their efforts.

"The actual rules don't require companies to look for American workers and specialized skills," Hira says. "The definitions have gotten loose. Everything in the system is written in favor of the employers."

The big companies have figured out how to play the visa game and take advantage of loopholes, Hira says. And the smaller companies, the ones that are more in need of specialized labor, are often out of luck.

The main reason American companies hire H-1B workers through outsourcing firms, Hira says, is to save money. A whole lot of it.

Employers are suppopesed to pay H-1B workers a "prevailing wage" based on the job and location. But Hira's research found that employers were recruiting H-1B labor at entry-level wages, not the average wage for specific jobs.

Infosys or Tata can save a company up to $45,000 per worker every year, according to Hira's analysis.

In 2013, for instance, Infosys snared almost 7,000 H-1B visas. The median wage it paid was $70,882, about $20,000 lower than a computer systems analyst in Rosemead, California. That's the home of Southern California Edison, a utility that replaced more than 300 American IT workers with H-1B workers employed by Infosys. Hira cites a compensation study that showed Edison IT specialists were earning an average annual base pay of $110,446.

The lower salaries at Infosys and other outsourcing firms are still attractive to thousands of tech workers in India, who average only $6,000 a year and clamor for an opportunity to work in the United States.

Neeraj Gupta came from India to America as a graduate student and then was hired on an H-1B by a Silicon Valley firm, which later sponsored his green card. Gupta went on to found his own tech company, which was ultimately acquired by an Indian outsourcing firm.

In 2009, after witnessing the offshoring of jobs, Gupta began looking into solutions that would create American jobs in technology services.

"With respect to President Trump, there is truth in what he is saying," Gupta tells me. "The premise of the visa is accurate. The challenge is how it has been hijacked by the IT outsourcing industry."

Hira, too, believes the good intent of H-1B has been overrun by corporations that cannot see beyond their profit margins.

He was in favor of H-1B, he told the Senate committee last year. But it was imperative to fix a broken system.

"High-skilled immigration has directly benefited my family enormously," Hira told lawmakers. Then, he issued this warning:

"Thousands of American jobs will be offshored. Tens of thousands of American workers will have their wages depressed. And thousands of American students will be denied opportunities. That's one lottery American workers and students are guaranteed to lose."

Laid off and forced to train his replacement

Craig Diangelo lost big to H-1B.

At first, he kept quiet, in line with an agreement he signed to not disparage his employer. But he was so incensed by the injustice at his workplace he could not stay silent.

Not only did Diangelo, 65, lose his job to a less-skilled, lower-paid foreign worker, but he was forced to train his replacement or face losing his severance.

Craig Diangelo lost his job at Northeast Utilities and had to train his replacement, an H-1B worker.

He'd worked in information technology all his life, but the sudden job loss dimmed his future considerably. So much so, that Diangelo is now running for office.

Frustrated by the inaction of lawmakers to reform America's guest worker program, Diangelo is running as a Republican to unseat Democrat Elizabeth Esty in Connecticut's 5th Congressional District.

"I would like the law to change," Diangelo says. "You cannot bring over an H-1B worker to replace an American."

Diangelo had always wanted to be a schoolteacher, but after finishing his degree in education in the mid-1970s he couldn't find a job. Instead he went to work for Travelers Insurance Cos. in Hartford, Connecticut.

He began as a COBOL programmer, and his career evolved over the decades as the tech industry changed. In his last full-time position at Northeast Utilities in Berlin, Connecticut, Diangelo helped support the company's storage architecture. He made $130,000 a year.

"It was a wonderful job," he tells me. "It paid me well. I worked with a great group of people."

That began unraveling when a merger with a smaller company led to changes in management. In October 2013, the new managers gathered the 220 employees in Diangelo's unit and bluntly announced that their jobs were going to Infosys and Tata Consultancy Services.

"Why were we not given the first rights to re-apply for our jobs?" Diangelo says. "Why was I not given the opportunity to go to Infosys and say: 'I would like to apply for this position?' "

To make matters worse, Diangelo was told he would have to engage in "knowledge transfer" and train his Indian replacement.

"I was in complete disbelief," he says. "I gave my soul to this company. They had been good to me. It didn't make any sense."

He was told his last day would be in December, but that was extended to March and then to May when his employers realized the replacement workers were not ready. They were not high-skilled employees filling a job for which no Americans were available, as was the intent of H-1B.

"They were lower-skilled workers," Diangelo says. "We had to train them from scratch. My replacement was making half of what I was making. And he had no benefits."

I'd met Infosys employees when I visited the company's shiny Googlesque campus in Bangalore, India, several years ago. They told me how IT jobs had opened up opportunities, changed their lives. For the first time in generations, their families aspired to so much more in life.

Tech companies are a point of pride in my homeland. The industry is the largest private sector employer in India and constitutes about 10% of the gross domestic product. Technology is a big reason why India arrived as a major player on the global stage.

I knew there was a mad rush to apply for H-1B visas at Infosys and other outsourcing firms. But what I did not realize is that these eager Indians were putting Americans out of work.

From Diangelo, I was hearing the ugly side of Indian tech.

Northeast Utilities employees put up US flags in cubicles after realizing they would lose their jobs to H-1B workers.

I contacted Infosys and Tata for comment. Tata did not respond. An Infosys spokesman told me the company was not granting any interviews regarding H-1B visas. He did, however, send me this statement:

"We continue to invest in the local communities in which we operate, including hiring local American top talent, bringing education and training to our clients to shrink the skills gap in the US, and working with policymakers to foster innovation within states and across the country. It is our endeavor to help clients leverage the best US talent together with the best global talent."

Diangelo says he found it humiliating, depressing even, that he had to stay on -- with his Infosys replacement -- at a job he knew would soon vanish for him. But he and his colleagues were older workers close to the top of their salary grades. He knew it would be hard to find employment elsewhere. He had few options.

Diangelo trained his replacement in Connecticut as well as 11 other workers in India. The company, he says, recorded his webinars, and he guesses his training sessions have been used many times since his departure.

This is how it sometimes works: Indian H-1B workers are brought in to replace workers here in America, but subsequently many of the jobs are moved offshore to India.

Diangelo and his colleagues on the second floor of the Northeast Utilities building put up small US flags on their cubicles. As each completed a last day at work, a flag came down. Diangelo was the last. When he returned after a weekend to turn in his company badge, only his flag remained. Then, that, too, was gone.

I asked for an interview with a manager at Northeast Utilities, now called Eversource Energy, and was sent a statement via e-mail:

"Three years ago we made strategic changes to our IT department to support the merger of two companies and keep pace with changing technologies to better serve our customers," the statement read. "As an electric and gas delivery business, we did not have the internal capabilities to efficiently meet the growing technology needs of the larger, combined company."

Eversource, said the statement, uses Infosys and Tata to perform some of its IT functions, and that employees such as Diangelo who were affected were offered comprehensive severance packages, career transition and training services and extended health care coverage.

This has nothing to do with immigration. We have a bill out there that allows foreign workers to take American jobs. Craig Diangelo

Eversource is hardly the only US entity that has been accused of laying off Americans in favor of cheaper Indian labor.

Employees at the University of California, San Francisco, had to train their replacements from an outsourcing firm. So did technology workers at Walt Disney World, New York Life, Toys R Us and Southern California Edison.

And these are just the cases that have surfaced publicly because of lawsuits and employees such as Diangelo who risked losing their severance by speaking out.

Diangelo says he holds nothing against his replacement worker from Infosys, nothing against immigrants. He blames the system that allows this to happen.

This year, he watched as the H-1B application date of April 1 approached. He had counted on Trump to put a moratorium on the visas. But now, he says, 85,000 more foreign workers will arrive in the United States in the coming months.

"That means another 85,000 Americans will lose their jobs," he says.

"Every time I talk to my senators and congressmen, they say we need a comprehensive immigration bill," he says. "But these are two separate things. This has nothing to do with immigration. We have a bill out there that allows foreign workers to take American jobs."

"The government needs to make changes to the H-1B program," he says. "Even the lawmakers who made this law say it has been hijacked."

Diangelo is referring to Bruce Morrison, a former Connecticut congressman who sponsored legislation creating the H-1B visa system but is now a vocal critic.

Several bills that aim to reform H-1B have been introduced in both the House and Senate this year. One of the co-sponsors of a House bill is Rep. Ro Khanna, an Indian-American from California's 17th Congressional District in the south San Francisco Bay Area and the heart of Silicon Valley.

Again, I thought of my own family as I read Khanna's bio. He was born in Philadelphia to parents who immigrated in the 1970s from India. Because of his background and because he represents so many who work in the tech industry, Khanna has taken heat for his stance on H-1B.

Please note: Ro Khanna, an Indian American politician funded heavily by NRIs, is championing restrictions on H1B: https://t.co/glRDDlYtLG — Rajiv Malhotra (@RajivMessage) March 3, 2017

Khanna tells me his Silicon Valley voters understand the need for reform. He says that as the son of immigrants, he understands the contributions of people who come from other lands. But their contributions cannot come at the expense of American workers.

"We need change so you don't have underpaid foreigners taking away American jobs," he says. "This bill is pro-immigrant and pro-American worker."

At the end of my conversation with Diangelo, he tells me the Infosys H-1B employee he trained wanted to be his friend.

"I couldn't allow myself to do that. I did not have hard feelings against him. But he was taking my job."

Diangelo took early retirement; he did not want to transition into a new career so late in life and eventually found contract work in IT. Many of his co-workers, he says, are still unemployed.

"We don't go out as much or give to charities," he says of himself and his former colleagues. "It has a downward spiral effect. A long-lasting one. It affects the morale of people."

Every time he pumps gas at his local Costco, he looks up at the Eversource compound on a hill and thinks: My job is still there.

Employees on the Bangalore, India, campus of Infosys, a tech giant that is one of the top recipients of H-1B visas.

Growing demand

On a recent morning, I visit Monty Hamilton, CEO of Rural Sourcing Inc., a technology outsourcing company based in Atlanta.

There are no H-1B workers here. It goes against the mission of the company, Hamilton tells me.

Hamilton grew up in a two-stoplight town in Mississippi. When he chose vocation over location, he was forced to chase his dreams in a big city. He began his career with Accenture, another big recipient of H-1B visas, before taking the reins at Rural Sourcing in 2008.

The company's goal was to find smart IT employees, not in foreign countries but in secondary US cities outside Silicon Valley: Albuquerque, New Mexico; Mobile, Alabama; Augusta, Georgia.

"We do need to import some talent, but we need to do a better job in training the US workforce to get into this field that is changing so fast," he says.

Though he won't hire H-1B workers, Hamilton says it's folly to think the visas can be done away with altogether.

His fifth-floor office overlooks the campus of Georgia Tech. He tells me that all the foreign students who are about to graduate will be forced to go home unless they find employer-sponsored H-1B or other visas.

"Why in the hell would we allow that?" Hamilton says.

America has 500,000 tech jobs open today, he tells me. And only 43,000 students who graduated with computer science degrees last year, he says, citing Code.org.

"How long does it take to fill a tech job? An average of 65 days. That tells me there is a shortage," Hamilton says.

Whether or not there truly is a shortage is the subject of much debate, I discovered. It often depends on the interpretation of statistics.

I read a petition that entrepreneurs including Bill Gates, Jeff Bezos and Tim Cook co-signed with educators, nonprofits and governors from both political parties urging increased computer science education. "There are currently over 500,000 open computing jobs, in every sector, from manufacturing to banking, from agriculture to healthcare, but only 50,000 computer science graduates a year," the letter said.

But I also read an Economic Policy Institute analysis that found American colleges graduate 50% more students in engineering and computer and information science than are hired in those fields each year.

Shortage or not, the Bureau of Labor Statistics predicted the number of technology jobs will rise from 3.9 million in 2014 to about 4.4 million in 2024. Part of the demand for tech jobs is due to the growing "Internet of things," including cloud and mobile computing.

"Technology is changing fast," Hamilton says. "We do need to import some talent, but we also need to do a better job in training the US workforce."

I leave Hamilton's office and come across a group of young Indian engineering students enrolled at Georgia Tech. They tell me they want nothing more than to stay here for a job. If they don't get one right away, they will go home and try to return with an H-1B visa.

They talk about it as though it were a coveted prize, a ticket to success.

JUST WATCHED Indian official says H-1B visas bolster jobs Replay More Videos ... MUST WATCH Indian official says H-1B visas bolster jobs 01:31

'Techsploitation'

For days, I ponder something Craig Diangelo told me. He realized his Indian H-1B replacement was also in a difficult position -- he had no idea he was going to America to take someone else's job.

H-1B workers brought over by outsourcing firms often don't know the circumstances they are about to face. They, too, are part of an abusive system, say H-1B critics.

The exploitation of Indian H-1B workers essentially amounts to indentured servitude, according to the Center for Investigative Reporting, which exposed what one worker called "an ecosystem of fear."

In a class-action lawsuit filed in California, H-1B workers described staffing agencies known as "body shops" that enticed workers to the United States and filed for their H-1B visas. Instead, when they arrived, the workers were huddled together in cramped "guest houses" and paid no wages until they were placed with a technology firm.

H-1B workers described having to pay the staffing agencies, pay for travel to jobs in other states and falling into debt before they even earned a penny.

Because H-1B visas are sponsored by companies, the employees are beholden to them. They risk losing their jobs and being sent back to India if they complain too loudly.

"It's human trafficking. They are being bought and sold," says Jack "Jay" Palmer, a former Infosys employee who brought a whistleblower lawsuit against the technology giant in 2012 alleging visa fraud.

Palmer accused Infosys of illegally using business visitor visas known as B-1 to fill positions in the United States. The B-1 visas are easier to obtain and have lower fees than H-1Bs and are intended for short stays to attend meetings and training sessions.

The lawsuit led to a federal investigation, and Infosys eventually agreed to a $34 million civil settlement with the Justice Department.

I catch Palmer on the phone as he's driving to the Atlanta airport for a flight to Washington. He says he's meeting with Sen. Chuck Grassley, an Iowa Republican and a sponsor of the Senate H-1B reform bill.

"I believe in the American dream. I have nothing against H-1B and green cards," Palmer says. "I just want to see the law enforced."

A few hours later, I get a call from an Indian man whom Palmer has been helping. He tells me he is from Hyderabad, another technology hub in India, and was sponsored for an H-1B visa by Tata Consultancy Services.

He fears repercussions at his job in New York and speaks with me only after I agree to withhold his identity.

He says he worked in India for a decade before he came to America on an H-1B and was "body-shopped." He was placed in a job with a published salary of $45 an hour, but after the body shoppers and the outsourcing companies take their share, he only makes about $29.

The man is 45 and has a wife and two children -- 8 and 12. His expenses amount to about $5,000 a month, about $1,000 more than what he takes home. He has fallen into debt and no longer has the ability to climb out of it.

"We cannot save any money," he says. "I have $20,000 in credit card debt, and I owe $15,000 for my car."

"Why don't you go back home to India?" I ask him.

"I do not even have money to buy tickets," he says.

He says he feels lucky, though. At least he is not in a "guest house" waiting for work.

Life, he says, goes on in limbo.

He says he was promised sponsorship for a green card but was asked to pay a $25,000 fee he couldn't afford. I spoke with another Indian H-1B worker in Atlanta who has applied for a green card, but the backlog is so great for Indian citizens that it can take up to 10 years or more. Until then, H-1B workers remain tethered to their employers.

"My dream was to come to America, but I don't want to stay here with this kind of life," the man in New York says. "But I have no choice. I replaced American workers, but I am a victim, too."

The man in New York is not alone. There are thousands of workers like him, Palmer tells me.

Palmer and other H-1B reformers want accountability.

They say US companies must be required to document their searches to fill positions with American workers. Employers must pay prevailing wages and be prevented from subcontracting or outsourcing H-1B jobs.

Reform advocates are pushing for a system of government enforcement and oversight of the H-1B regulations, not one that is reliant on whistleblowers to expose abuse.

Technology is here to stay. And it is changing at warp speed. The demand for smart talent is not going away. That's why even the biggest critics of H-1B are the most ardent backers of reform, not elimination.

What I hear them saying is the system ought to work the way it used to, when my father obtained an H-1 visa. He was hired for a job he was uniquely qualified for, and he was compensated with a decent wage.

No one wants to see Americans lose their jobs unfairly, and if my father were still alive, I know he'd be troubled by what I learned about the current H-1B program.

I also know he would be heartened to see that some of the most ardent backers of visa reform are Indian Americans. After all, we are the ones who have most reaped the rewards of H-1B.