Every natural disaster is different, and how people respond in their aftermath is different, too. For aid groups that help in recovery efforts, this makes it difficult to figure out what exactly is the most effective way of helping: One family might need to prioritize repairing their car over rebuilding their house, because they still have to commute to work. Another might need specialized food or medicine. And aid groups sending truckloads of unrequested supplies can clog up already cluttered fallout zones with stuff that just spoils or has to be trashed because people needed a new roof, not a donation of blankets.

One simple fix for this problem is to just give cash to the impacted people and trust that they’ll know best how to spend it. Giving cash as aid is a trend that’s been gaining traction as a strategy in international aid and recently was employed after Hurricanes Maria and Harvey in the U.S. Now two major tech players are working together to try to measure just how much more effective it is to give cash instead of goods after a disaster, with the hopes of pushing aid organizations to ask themselves harder questions about how effective the help they give really is.

To do that, Google.org (Google’s nonprofit division) has granted $3 million to the nonprofit GiveDirectly, which specializes in providing direct cash transfers to those in need. That money is earmarked for distribution the next time a major disaster hits in the U.S. In the meantime, the teams are figuring out exactly how they’ll distribute the money and measure the results so they have clear data about the effectiveness.

GiveDirectly started providing direct cash transfers to alleviate poverty in Africa roughly a decade ago. The group is committed to radical transparency and has accumulated vast evidence to show its method works. In 2012, Google.org became an early backer, contributing more than $1 million in general operating support. Including this recent grant, Google.org has now given more than $10 million to GiveDirectly operations.

After seeing the devastation of the 2017 hurricane season in the United States, GiveDirectly decided to try the same tactic for disaster recovery. As it explains in a recent research paper, the results look promising. The group gave $1,500 per household to people affected by Hurricane Harvey in and around Houston and Hurricane Maria in Puerto Rico. The money went to those in already impoverished areas who suffered severe upheaval. The group gave away roughly $9.5 million in total to 1,600 people in Texas and another 4,800 in Puerto Rico.

“Even in the case where basically everyone had the same thing happen to them, the [recovery needs] that they prioritized varied a lot,” says GiveDirectly’s CFO Joe Huston. They group tracked purchases in follow-up surveys to figure out what specific “bundles” might look similar—like people spending on healthcare or food, clothes or drywall. In Puerto Rico where people were spread among two dozen communities, only 6% of any given group’s interests overlapped.

The net effect in both major disasters zones was more common. Over 70% of recipients in Puerto Rico and nearly 50% of those in Texas say the funds helped them avoid losing their jobs. Nearly everyone in Puerto Rico and about 55% of those in Texas also experienced a reduce in stress. And the vast majority of people in both areas said they expected the gain from the fast infusion of funds would continue to benefit their lives in some way at least one year in the future. “I think there’s a bunch of little investments you can imagine people making that the cash helped enable.”