Walmart, the world’s largest brick and mortar store, is buying up e-commerce companies to compete with major rival, Amazon.

The long-time US retail king has witnessed a transformation in its business model in the past few years, with physical stores closing down across the country and more consumers shopping online.

The company has been growing its online footprint through various acquisitions, and is increasing the expenditure on its online retail strategy that complements its offline retail presence.

Last year Walmart spent $3.96bn on developing information systems, distribution, and digital retail platforms.

The acquisition of Jet.com at a whopping amount of $3.3bn was not only to supplement its e-commerce ambitions but also to reduce the competition in the hotly contested online grocery businesses.

In the last six months, the company has also bought three more online companies, Moosejaw, Shoebuy.com, and Modcloth.com, spending around $180m.

Such initiatives have worked, to some extent.

In the final quarter of 2016, Walmart’s US e-commerce sales and gross merchandise volume grew by 29 percent and 36.1 percent respectively.

However, the company is still reliant on the offline stores for the vast majority of its total sales, with online sales relatively small, contributing just three percent of its total sales value of $482bn in 2016.

Despite the low contribution Walmart’s online pace is gaining a significant momentum and the company is listening to what people want.

People want same-day delivery or free shipping costs so Wal-Mart in early 2017, started offering free, two-day shipping on orders above US$35, to compete with its rival, Amazon’s Prime shipping service.

3 Things That Will Change the World Today

Walmart also can now text shoppers the location of products in the store, potentially winning back customers fed up with confusing, sprawling store layouts.

Walmart is not going to let Amazon win its biggest retailer crown without a fight.