Amazon said Wednesday it will spend $2 billion in a fund aimed at preserving and creating affordable housing in the Arlington, Va., Nashville and Seattle areas, home to three of the e-commerce giant’s headquarters.

The funds will go toward creating or preserving 20,000 affordable homes in the areas, the company said.

It follows similar investments pledged by Facebook and Google, as tech giants have faced criticism over driving home prices up in the Bay Area and displacing longtime residents.