Compass, a tech-enabled real estate company that went public in March, posted $2 billion in second-quarter earnings this week. The company estimated it gained over six percent of the U.S. real estate market, doubling its stake from a year ago.

The company’s profitability is also through the roof, which CEO Robert Reffkin credits to agents armed with technology.

“This past quarter Compass agents strongly outperformed their peers in one of the most competitive real estate markets in recent memory,” Reffkin said in a statement. “This record quarter validates our vision that agents, when powered by the Compass technology platform, are significantly more successful.”

The pandemic has had a yo-yo effect on the housing market in the U.S. The beginning of the pandemic saw housing costs plummet, but they soon rebounded as the demand for housing outpaced supply. The rising cost of building materials and labor, which have increased by 12 percent from Q2’20 to Q2’21, is expected to drive prices higher.

The convergence of housing prices, demand and bolstering technology are all contributing factors to the success Compass has found as a newly public company. Under the constraints of the pandemic, the company released new technology for agents to show properties virtually and has automated processes like listing prices, choosing the best time for showings and digital marketing tools for increased efficiency.

The company, founded in 2012,  is only the ninth publicly traded company on the U.S. stock market owned by a Black founder.

Compass added nearly 1,000 new agents over the past quarter, increasing the total number of agents to 10,629 agents working across 15 new markets. The company is also expected to be profitable a year earlier than originally projected.

The growing number of real estate agents on the platform are tracking for high retention rates at above 90 percent, according to Reffkin.

“I am pleased to say that our principal Q2 agent retention in 2021 was higher than the prior quarter and higher than the prior year,” Reffkin said during the company’s Q2 earnings call on Monday. “This is particularly important to us as retention is the primary indicator of the value our customers feel they’re getting from our platform.”