A religious school in Wisconsin was under federal investigation after it sent a letter to parents suggesting gay or transgender students would be expelled, The Baraboo News Republic reported Thursday.

St. John’s Lutheran School receives federal funding for its free lunch program and busing through a No Child Left Behind initiative, according to the report. That means the private religious school cannot discriminate based on race, religion, gender or sexuality.

But in a letter sent home to parents in February, Principal Craig Breitkreutz detailed the school’s strategy to get around those federal anti-discrimination guidelines without losing funding.

Breitkreutz informed parents that St. John’s now requires a birth certificate upon admission to the school. The school also changed its handbook agreement, which parents must sign prior to enrollment, to reflect that students may be dismissed for “sinful” choices, including homosexuality.

“If we cannot legally refuse students who are struggling with homosexuality or gender identification, we must maintain our right to hold to the truths of God’s Word,” Breitkreutz wrote. “In other words, although we do not have the right to refuse admittance to people choosing an outwardly sinful lifestyle, we do maintain the right to discipline and dismiss students for these choices.”

The letter spawned a discrimination complaint from the nonprofit Freedom From Religion Foundation, stating that the attempted loophole spelled out in Breitkreutz’s letter is illegal and thus the school should be ineligible for federal funding, according to the News Republic.

In response, the U.S. Department of Agriculture, which implements the free lunch program, opened an investigation.

“USDA is reviewing this complaint,” USDA spokeswoman Amanda Heitkamp told the newspaper. “We are firmly committed to ensuring federal protections against discrimination with respect to all of our programs and activities.”

Breitkreutz told the News Republic that if the funds were revoked, the school would lose access to programs like free lunches that help students. But he said he was sticking to the policy, arguing that being gay or transgender was equally as sinful as cheating on a test.

“We definitely don’t have a goal of finding a way to kick students out,” Breitkreutz told the News Republic. “I mean, that’s not the goal. The goal is to share with them God’s word.”

Breitkreutz told the newspaper that the school has not had to discipline any LGBT students since he arrived there two years ago. He added that students who did exhibit sinful behavior would be dealt with patiently, but if they would be expelled if they then continued to exhibit the behavior.

The school’s pastor, Nick Maglietto, flatly told the News Republic that the school is “not welcoming” to LGBT students.

“So rather than us trying to weed them out, it’s more letting them know where we’re coming from up front and making their choice based on whether this would be an environment for their child,” he said.