The legislation remakes the most controversial aspect of the USA Patriot Act - the once-secret bulk-collection program that allows the NSA to sweep up Americans' phone records and comb through them for ties to international terrorists. Over six months the NSA will lose the power to collect and store those records, but the government still could gain court orders to obtain data connected to specific numbers from the phone companies, which typically store them for 18 months.