A top official at the National Security Agency explained to members of Congress on Wednesday that it spies on people who know people who know people who might be terrorists.

As intel officers took yet another beating from members the House Intelligence Committee over the surveillance, Deputy Director of the National Security Agency John C. Inglis explained to members of House Judiciary Committee about how NSA analysts search for connections to terrorist organizations.

By conducting “a second or third hop query” through the collected phone and Internet records, analysts look to find connections to known terrorists.

“”Hops” refers to a technical term indicating connections between people,” The Guardian reports.

“A three-hop query means that the NSA can look at data not only from a suspected terrorist, but from everyone that suspect communicated with, and then from everyone those people communicated with, and then from everyone all of those people communicated with,” The Guardian reports.

On Tuesday, Michigan Republican Representative Justin Amash submitted to the House Committee on Rules an amendment to the upcoming defense appropriations bill aimed at defunding the surveillance of people not under investigation, The Daily Caller reported.

Members of the committee grilled the witnesses, and even Wisconsin Republican Jim Sensenbrenner — author of the Patriot Act — threatened that Congress could let the Section 215 provision of the Patriot Act expire in 2015.

The Department of Justice says that Section 215 provides the legal justification for the collection of the phone records of millions of Americans.

Texas Republican Rep. Ted Poe expressed his concern over the intelligence community’s interpretation of the Fourth Amendment — against unreasonable search and seizure — stating that in the former Soviet Union, national security trumped the privacy rights of citizens.

California Democratic Rep. Zoe Lofgren, a close ally of the Silicon Valley tech community, said that the program has “gone off the tracks legally and needs to be reined in.”

Lofgren asked the witnesses to allow the accused tech companies under fire — including Microsoft, Google, Facebook and Yahoo — to respond to criticisms they face around the world for their alleged cooperation with the U.S. government.

The companies are currently prohibited by law from openly acknowledging their participation in such programs.

Follow Josh on Twitter