Despite a $17 trillion debt, President Barack Obama assured high school students and teachers in Brooklyn on Friday that there are enough resources for the spending on education, research and infrastructure, so long as tax loopholes are closed.

“We’ve got enough resources to do it if we stop spending on things that don’t work and don’t make sense, or we make sure the people that are wiggling out of their taxes through these corporate loopholes that only a few people at the very top can take advantage of, if we just do everything in a fair, common sense way, we’ve got the resources to be fiscally responsible and invest in our future,” Obama said Friday Pathways in Technology Early College High School in New York.

$17 Trillion Debt, but Obama Says ‘We’ve Got Enough Resources’ to Spend More

President Barack Obama pauses while speaking at the Pathways in Technology Early College High School in the Crown Heights section of Brooklyn on October 25, 2013 in New York City. President Obama had mentioned the school in a part of Brooklyn that’s struggled with poverty and violence during his State of the Union address in February. While in New York Obama will also attend events to raise money for the Democratic National Committee and Democratic Congressional Campaign Committee. (Getty)

The president made the stop before a Democratic fundraising event in the evening.

“This obsession with cutting just for the sake of cutting hasn’t helped our economy grow, it’s held us back,” Obama said. “It won’t help us build a better society for your generation.”

This is the president’s second pivot this week from the problem plagued Obamacare rollout. On Thursday, he talked about immigration reform. Obama used the backdrop of his remarks to talk about the budget, the importance of education funding and to say Congress needs a remedial math course.

“I know that budgets aren’t the most interesting topic for a Friday afternoon even at a school where young people like math,” Obama said. “By the way, I just sat in on a lesson called real world math, which got me thinking whether it’s too late to send Congress here for a remedial course. But a budget is important because what a budget does is it sets our priorities and tells us what we think is important.”

Obama said more spending occur in certain areas and be fiscally prudent if tax loopholes are closed.

“So we need a budget that is responsible, that is fiscally prudent, but a budget that closes what we don’t need, closes wasteful tax loopholes that don’t create jobs, freeing up resources to invest in the things that actually do help us grow,” Obama said. “Things like education and scientific research and infrastructure, roads, bridges and airports. This should not be an ideological exercise. We should use some common sense. What’s going to help us grow?”