President Barack Obama acknowledged Thursday that leaks of classified information by former National Security Agency contractor Edward Snowden had “identified some areas of legitimate concern” but he said that NSA surveillance was still necessary to protect the country from terrorism.

“I can’t confirm or get into the details of every aspect of what the NSA does. And the way this has been reported, the Snowden disclosures have identified some areas of legitimate concern,” Obama told msnbc’s Chris Matthews in an exclusive interview Thursday. “Some of it also has been highly sensationalized and, you know, has been painted in a way that is not accurate.” Matthews had asked the president to respond to a story in The Washington Post, based on documents obtained from Snowden. which revealed that the NSA is tracking billions of cell phone locations wordwide each day.

The Snowden disclosures have sparked a national debate over the scope of NSA surveillance since stories first began appearing in June. Among the first documents made public was a secret court order renewing a demand for the communications records of millions of Verizon customers under a provision of the Patriot Act. While the NSA’s activities was known to at least some members of Congress privy to classified information, it was not known to the public.

Since then, members of Congress have been at odds over whether to end NSA data gathering entirely or explicitly authorize it. Subsequent disclosures have involved everything from targets of American cyberattacks to spying on foreign leaders, secretly tapping into tech companies’ servers and gathering data on foreigners in cooperation with other intelligence agencies abroad.

Top intelligence officials have insisted the programs are necessary to protect the United States from threats and that ending them would leave the country more vulnerable to terrorism.

“We do have people who are trying to hurt us and they communicate through these same systems,” Obama said. “We’ve got to be in there in some way to help protect the American people, even as we’re also making sure the government doesn’t abuse it.”

To the audience of college students at American University, Obama said the NSA was “not interested in reading your emails or text messages, that is not something that is done. “Outside of our borders, the NSA is more aggressive, it is not constrained by laws,” he said.

Still, Snowden’s disclosures forced the administration to launch a review of the NSA’s many secret programs. Obama said that a group of experts would be presenting him with a set of recommendations before the end of the year. “I will be proposing some self restraint on the NSA and intiating some reforms that can give people more confidence,” Obama said.

Public opinion remains divided on whether or not Snowden’s leaks have been in the public interest or have harmed national security. The Justice Department has charged Snowden with espionage, but he remains in Russia where he was granted temporary asylum over the summer. The president’s remarks about Snowden’s disclosures “identifying areas of public concern” may strike some as being in tension with the decision to prosecute him.

“Now, the NSA issue is a broader issue. And you’re right, young people, rightly, are sensitive to the needs to maintain their privacy and internet freedom and by the way so am I,” Obama said. “That’s part of not just our First Amendment rights and expectations in this country but it’s particularly something young people care about because they spend so much time texting and Instagramming.”

Acknowledging that “all of us spend more and more of our lives in cyber space,” Obama said that some form of surveillance remains necessary. “If we’re gonna do a good job preventing a terrorist attack in this country, a weapon of mass destruction gettin’ on the New York subway system, et cetera, we do want to keep eyes on some bad actors.”