Target tgt dodged a bullet over Christmas.

The discount retailer reported a 34% increase in online sales during the holiday season, re-accelerating the pace of growth after it slowed down in preceding quarters.

Still, for the year, Target’s e-commerce rose only 31%, well below the 40% CEO Brian Cornell promised Wall Street a year ago. And that was despite spending about $1.4 billion in 2015 on tech.

So to make sure that online sales growth doesn’t slow again, Target is beefing up its tech spending even further. It plans to spend close to $1.8 billion this year on capital projects, with the bulk going to e-commerce and supply chain improvements, as well as in-store improvements, company executives said at Target’s annual meeting with Wall Street analysts. (Last year, the plan had been to spend about as much on tech as on things like new stores and remodeling.)

What’s more, Target will ramp that up even more, spending some $2 billion a year at least starting in 2017.

“So are we declaring victory?” Target CEO Brian Cornell said. “Not even close.” He added: “These are the building blocks of our future.”

Last year was the first in Target’s history it spent more on tech than on purely brick-and-mortar expenses like new stores and remodels. It hired a chief information officer, Mike McNamara, from British grocer Tesco, and this month poached a top Amazon veteran to assist with what Cornell calls the “unsexy” but essential parts of Target’s operations.

One of Cornell’s top priorities is to improve the sometimes clunky target.com site and continue beefing up the mobile shopping app. But there are more prosaic projects for Target, such as improving the reliability of the point-of-sale systems–last year, too many cash registers froze during checkout. (The company has actually pared many of its tech projects to focus on those it thinks will give most band.)

Target’s tech systems were built up at a time when merchandise moved from distribution center to stores. But nowadays, the tech needs to support co-ordinating product that moves between stores as well as with fulfillment centers, customers looking up inventory on a smartphone and the growing use of stores as a way to fill online orders.

And Target has a lot to show for its recent tech investments. The number of online orders Target shoppers picked up in stores grew 60% during the holidays, allowing the retailer to offer more convenience (especially in the last two days before Christmas when many would hesitate to order from Amazon.) What’s more, 40% of online orders picked up in store or shipped from a store were items that were out of stock at Target’s main distribution facilities.

The tech is also helping Target keep a better handle on merchandise levels. Operations chief John Mulligan told the Wall Street analysts that there were 40% fewer merchandise out-of-stocks during the holiday season.

“When you talk to our guests, the number-one pain point is that we’re out of stock,” Mulligan said.

The discount chain’s chief rival, Walmart, wmt saw its e-commerce rise a modest 8% during the holiday quarter, continuing a trend of smaller and smaller increases and raising fears its web sales were already plateauing, a worrisome development considering Amazon.com’s continued fast growth. amzn

So Target will keep ramping it up. Last year, comparable sales at Target rose 2.1% and it expects as much as 2.5% this year.

In front of a Wall Street audience, Target’s brass said it is aiming for 3% per year starting in 2017, a lofty goal in a tough retail climate. And that makes tech spending all the more important.