Its shares were up 2.8 percent to $48.72 in early-afternoon trading, hitting a record high.

The retailer, which operates the Macy’s and high-end Bloomingdale’s chains, said comparable sales rose 3.8 percent in the quarter, a slightly below Wall Street expectations. Overall sales were in line with expectations, according to Thomson Reuters I/B/E/S, up 4 percent to $6.39 billion.

Macy’s has benefited from large investments in technology in recent years, which have allowed it to use hundreds of its stores to deliver orders placed online, fueling its e-commerce and giving it an edge over many department store rivals.

It has also gotten a bump from a sharp sales decline at rival J.C. Penney Co Inc (JCP.N) and a middling performance at Kohl’s Corp (KSS.N).

“I do think these guys (Macy‘s) continue to take share from the J.C. Penneys of this world and the Kohl’s of the world,” Edward Jones analyst Brian Yarbrough told Reuters.

Many U.S. shoppers, especially those with lower incomes, proved to be cautious earlier this year amid concerns about sharp cuts in government spending and a wobbly job market.

“We are seeing some weakness among our more budget-conscious, what we call deal-hunting customers,” Macy’s Chief Financial Officer Karen Hoguet told analysts on a conference call.

Penney last week reported same-store sales fell 16.6 percent in the first quarter, still feeling the effects of the company’s decision last year to eliminate most discounting, a strategy it has since dropped. Kohl’s is expected to report a 0.1 percent decrease in same-store sales when it posts results on Thursday.

Among department store operators, analysts expect only Nordstrom Inc (JWN.N) to outperform Macy’s in the first quarter.

Macy’s merchandise inventory levels were up 3 percent at the end of the quarter, roughly in line with expected sales gains, lowering the potential damage to profit if Macy’s has to discount more than expected because shoppers pull back.

Hoguet said women’s clothing and apparel aimed at teenagers and young adults were among the company’s slowest businesses, while handbags and menswear were top performers.

Macy’s posted net income of $217 million, or 55 cents share, for the quarter that ended May 4, up from $181 million, or 43 cents per share, a year earlier, and topping analysts’ average forecast by 2 cents.

Despite the higher-than-expected profit, Macy’s left its full-year earnings forecast unchanged at $3.90 to $3.95 a share on a same-store sales rise of 3.5 percent.

The company boosted its quarterly dividend to 25 cents a share from 20 cents and increased its share repurchase authorization by $1.5 billion.