Target raised its annual profit forecast on Wednesday after reporting better-than-expected quarterly results as higher investments to remodel stores and beef up digital business drew in more shoppers, sending shares up nearly 15 percent.

The retailer has been adding muscle to its same-day services with initiatives like Shipt and Drive-up as customers increasingly get used to faster deliveries from rivals Amazon.com Inc. and Walmart Inc.

These services allow shoppers to pull into a store and pick up their orders within minutes of placing them through the mobile app or website. The company said one out of five customers, who used its same-day service in the second quarter, were new.

Faster services also drove more than three-fourths of the 34 percent increase in comparable digital sales. The robust online sales accounted for more than half of the 3.4 percent growth in same-store sales.

Analysts on average were expecting same-store sales to grow 3 percent, according to IBES data from Refinitiv.

“Q2 could not have gone better for Target,” Moody’s vice president Charlie O’Shea said.

Target has also been building on its merchandise by adding more private label brands, redesigning about 300 stores this year and opening smaller locations in college towns and urban areas to reach a wider audience.

Earlier this week, the company said it was starting a new grocery brand, Good & Gather, that would hit stores in September.

The retailer expects the brand, which has everything from dairy and meats to ready-to-eat pasta, to have more than 2,000 items by the end of 2020.

Its store traffic grew 2.4 percent, while gross margins improved to 30.6 percent in the quarter, benefiting from a better assortment of its products and competitive pricing.

“The strong gross margin performance despite the slew of weather-driven markdown concerns highlights the companies balanced mix, strong execution, and scaling e-commerce strategies,” JP Morgan analyst Christopher Horvers said.

Target said it expected full-year adjusted profit to be between $5.90 and $6.20 per share, up from the prior range of $5.75 to $6.05 per share.

Excluding certain items, the company earned $1.82 per share in the quarter ended Aug.3, beating the average analyst estimate by 20 cents.

Total revenue rose 3.6 percent to $18.42 billion, above expectations of $18.34 billion.

Shares of the company, which have risen 29 percent this year, were on pace to open at a record high.