WASHINGTON (AP) — Leading senators unveiled proposed changes to the way the National Security Agency gathers U.S. records in its hunt for overseas terrorists or spying targets, and top intelligence officials said they would cooperate to try to win back the public trust, following disclosures about the extensive NSA collection of telephone and email records of millions of Americans.

The Senate Intelligence Committee’s bipartisan leadership used a hearing Thursday to promote legislation to change the Federal Intelligence Surveillance Act.

The lawmakers seek to trim NSA’s authority to access and analyze U.S. phone records and provide new protections to Americans’ privacy. They also want to broaden the government’s spying powers to allow monitoring of terror suspects who travel to the U.S. after being tracked overseas by the NSA.

Sen. Dianne Feinstein, D-Calif., chairwoman of the committee, said the legislation would “strictly limit access to the … phone metadata records, expressly prohibit the collection of the content of phone calls” and limit the amount of time such U.S. phone call data could be kept.

She said the bill, which could be passed by her committee as early as next week, would “change but preserve” bulk record collection.

Such records show the date and length of calls and the numbers dialed.

Feinstein’s proposed legislation would not stop the bulk collection of telephone and email records. A separate bipartisan group of four senators unveiled legislation earlier this week to end those bulk collections.

One of those senators, Mark Udall, D-Colo., challenged the head of the NSA, Gen. Keith Alexander, on just how far his agency could go when gathering those records.

“Is it the goal of the NSA to collect the phone records of all Americans?” Udall asked at Thursday’s hearing.

“Yes, I believe it is in the nation’s best interest to put all the phone records into a lockbox that we could search when the nation needs to do it. Yes,” Alexander replied.

Udall’s counterpart on the committee in proposing more stringent limits, Sen. Ron Wyden, D-Ore., asked Alexander whether the NSA had ever collected or made plans to collect Americans’ cellphone signals to track the movements of individual callers.

Alexander answered both times that the NSA was not collecting such data and would have to ask for court approval if it wanted to.

Questioned further, he cited a classified version of the letter that was sent to senators and said, “What I don’t want to do … is put out in an unclassified forum anything that’s classified.”

Wyden promised to keep asking.

The testy exchange at the hearing illustrated the wider tension that has grown between the public and the U.S. intelligence community since the disclosures of widespread NSA collection of Americans’ telephone and email records by a former NSA systems analyst, Edward Snowden.

Feinstein and the committee’s top Republican, Sen. Saxby Chambliss of Georgia, defended U.S. intelligence efforts, as did Alexander and Director of National Intelligence James Clapper, who insisted that while bulk U.S. records are collected, analysts don’t listen in on individual Americans’ phone calls or read their emails without a court order.

Clapper told the committee he was willing to consider limiting both how U.S. telephone and email data collected by NSA is used and the amount of time it is stored.

He said he’s also open to other changes, such as appointing an independent official to oppose the government in hearings before the Foreign Intelligence Surveillance Court, the secret federal panel that considers all government surveillance requests.