(Reuters) - Dollar General Corp will plow back a part of its 2019 profit to revamp its supply chain and add self-checkout lanes at its stores as it competes with online grocers and U.S. chains Walmart Inc and Kroger Co.

FILE PHOTO: A sign is seen outside a Dollar General store in Chicago, Illinois, U.S. May 23, 2016. REUTERS/Jim Young

Shares of the discount retailer fell nearly 10 percent on Thursday after it projected full-year profit below analysts’ expectations and said it would spend $50 million for the initiatives.

The company, which operates more than 15,000 stores in the United States, said it would open 975 new stores and remodel 1,000 old ones. The upgrades would include introducing self-checkout lanes and tweaking its shelf stocking process to make it faster.

Dollar General also said by the end of fiscal 2019 it aims to become its own distributor of fresh and frozen foods to as many as 5,000 stores in a bid to rein in costs and offer more private label brands.

“We have some distribution voids quite frankly, across the country.... By taking it in-house, we believe it will simplify our network and be able to execute that much better,” Chief Executive Officer Todd Vasos said in an earnings call.

While these steps would pressure earnings this year, Dollar General said it would lead to cost savings as early as 2020.

To pull in more customers, Dollar General will start its own click-and-collect service later this year and also launch its private label baby product and cosmetics brands.

Dollar General said it expects to earn $6.30 to $6.50 per share in fiscal 2019, below the average analyst estimate of $6.65, according to IBES data from Refinitiv.

Excluding items, the company earned $1.84 per share in the fourth quarter ended Feb. 1 but missed the average analyst estimate of $1.88, blaming on higher transportation cost and lower sales of high-margin products.

However, the company’s same-store sales rose 4 percent and beat the 2.6 percent increase analysts had estimated, as its customers, who benefited from an earlier-than-usual distribution of food stamps, spent more on groceries.

Net sales rose 8.5 percent to $6.65 billion and beat analysts’ expectations of $6.61 billion.

Rival Dollar Tree Inc’s shares were down 1.31 percent. The company last week reported better-than-expected same-store sales, but wrote down the value of its Family Dollar chain by $2.7 billion after years of stagnating sales.