Target’s investment in same-day pickup and delivery options is paying off. The company, which today offers same-day in-store pickup, drive-up and same-day delivery through its acquisition of Shipt, said this week that these services combined have more than doubled their sales in the last year. In addition, they accounted for more than a third of Target’s digital sales, up from about 20% last year.

“These options offer speed, convenience and reliability and as a result, they are quickly becoming the preferred fulfillment choices for our guests,” said Target CEO Brian Cornell, speaking to investors about Target’s Q2 earnings. “And most importantly, because these options leverage our store infrastructure, technology, and teams, same-day fulfillment delivers outstanding financial performance as well,” he added.

What’s notable about the same-day sales is that they’re bringing in guests to Target who had never before placed digital orders with the retailer.

Roughly 1 in 5 customers placing a same-day order in the second quarter were placing an order with Target for the first time.

And once Target customers become familiar with the process, they seem to return in short order. During Q2, more than three-quarters of the same-day orders were placed by guests who had used same-day fulfillment in the past three months.

Target’s ability to grow its same-day sales in this fashion was the result of investment in infrastructure, technology and even its brick-and-mortar stores themselves.

On the technology front, Target says its pickup and delivery services benefited from increased order-picking efficiency. Instead of using a first-in, first-out (FIFO) system, new algorithms are being used to prioritize the sequence of order picking that helps direct store employees on which work to do first, as well as the best box size for packing orders.

The technology also helps to optimize the path for order picking to minimize the number of steps between the sales floor and back room.

Target claims that since the beginning of last year, these improvements have led to an over 30% increase in order picking for drive-up and pickup services. Its ship-from-store capability also improved over 30% during that time.

Meanwhile, the retailer’s $7+ billion remodeling project announced in 2017 was focused on more than just updating the stores’ look-and-feel and merchandising displays. The new-format stores also include changes designed to cater to online shoppers who come inside the store for their order pickups by adding more space for things like Order Pickup.

Outside, space is added for Drive Up customers who shop online then later drive to the store for curbside service.

This summer, Target passed its 500th store remodel, and says it’s on-track to remodel 1,000 stores by the end of 2020. It also plans to open more small-format stores — about a third of the size of a traditional Target, or on average, 40,000 sq ft — in big cities, suburbs and college campuses.

Target says it plans on opening 30 more small-format stores per year, as it did last year and the year prior. It said on Friday it had opened its 100th small-format store.

All the changes to make Target’s stores more of a home for order fulfillment has helped the retailer reduce costs, as well, the company pointed out this week on its Q2 earnings.

Target says as it’s shifted away from upstream distribution centers for order fulfillment to its stores, costs went down by more than 40%. And costs related to same-day services went down by 90%. Target today has 1,855 U.S. stores, which is how it’s able to make this store-centric strategy work.

Many traditional big-box retailers are struggling under the weight of competition from Amazon — Macy’s, Kohl’s and J.C. Penney all released disappointing earnings this week, for example.

Target’s earnings, however, beat every estimate this week, sending shares to a record high.

The company reported $18.42 billion in revenue, above the $18.34 billion expected. Profits were up 17%, to $938 million ($1.82 a share) compared with $799 million ($1.49 a share) a year ago.

Second-quarter comparable sales grew 3.4%, with same-day fulfillment accounts for nearly 1.5 percentage points of that. Over the past two years, comparable sales have grown 10%, Target said.