(Reuters) - A federal judge on Friday said he was encouraged by a new U.S. plan to reunite parents and children who had been separated at the U.S.-Mexican border under President Donald Trump’s now-abandoned “zero tolerance” policy toward illegal immigrants.

Undocumented immigrant families are released from detention at a bus depot in McAllen, Texas, U.S., July 27, 2018. REUTERS/Loren Elliott/File Photo

The reunification plan set forth in a Thursday night court filing described several processes to locate parents who had been removed from the country, determine their intentions for their children, and ensure that children remain safe.

“There’s no question the government has put in a great deal of thought into this,” U.S. District Judge Dana Sabraw in San Diego said at a hearing.

Sabraw also said the plan “appears to be a very good one, a sound one, at least from a broad-brush perspective.”

The plan provided that the government would resolve concerns about the children’s safety and parentage.

It also called for the government to work with the American Civil Liberties Union and foreign governments to locate parents and determine their wishes, and arrange travel documents and transportation for children when parents opt for reunification.

Sabraw has been monitoring the government’s progress in reuniting 2,551 children with their parents since ordering their reunifications on June 26.

The ACLU had brought a lawsuit that led to Sabraw’s reunification order.

Many of those separated had crossed the border illegally, while others had sought asylum at a border crossing.

Trump abandoned the separation policy on June 20 after broad criticism at home and internationally.

At Friday’s hearing, ACLU lawyer Lee Gelernt said he had some concerns about the government’s reunification plan.

Sabraw gave the ACLU the weekend to study the plan and discuss its concerns with the government, and bring unresolved issues to his attention by Monday morning.

He also praised the government and ACLU for “really working collaboratively, which is absolutely essential” for reunifications.

The judge’s comments marked a change from a week earlier, when he called the government’s progress in reunifying families “unacceptable.”

Roughly 559 of the 2,551 children remain in federal custody, down from 572 a week earlier, according to a separate Thursday court filing. They included 386 whose parents had been removed from the country, that filing said.