NEW YORK (AP) Macy’s raised its annual profit forecast as the department store reported an unexpected increase in a key sales measure.

The Cincinnati department store chain has now reported its third straight quarter of higher sales at existing stores after a three-year slump, though the sales momentum slowed.

Shares fell in premarket trading on Wednesday.

The report offered encouraging news for other department stores, which are aiming to reinvent themselves as shoppers move increasingly online. J.C. Penney and Nordstrom are expected to report their second-quarter earnings results on Thursday. Kohl’s is slated to release its results next week.

Macy’s, the first of the department store group to release its results, has been expanding its store label brands to help differentiate itself from its rivals. It’s also adding more of the off-price Backstage stores and upgrading its checkout technology to make it faster and easier for shoppers. It’s testing more curated merchandise displays and localized marketing. It also recently acquired the concept store called Story, which rotates themes and what it sells every few months, and brought Story’s founder Rachel Shechtman aboard to create better shopping experiences at Macy’s.

“The combination of healthy stores, robust e-commerce and a great mobile experience is Macy’s recipe for success,” said Jeff Gennette, Macy’s chairman and CEO, in a statement.

A strong job market and higher confidence are also helping shoppers get in the mood to spend. The Commerce Department reported on Wednesday that Americans shopped at a healthy pace in July.

The National Retail Federation, the nation’s largest retail trade group, raised its annual sales forecast earlier this week, citing better-than-expected sales in the first half of the year because of tax cuts and an improving job market. It now expects annual retail sales to rise to 4.5 percent from the original projection of 3.8 percent to 4.4 percent growth. The numbers exclude automobiles, gasoline stations and restaurants. But the trade group warned that trade wars between China and the U.S. could dampen consumer confidence in the critical second half.

Macy’s said it earned $166 million, or 53 cents per share, for the quarter ended Aug. 4. That compares with $111 million, or 36 cents per share, in the year-ago period. Sales fell slightly to $5.57 billion from $5.64 billion.

Analysts were expecting profit of 50 cents on sales of $5.5 billion, according to FactSet.

Sales at stores opened at least a year rose 0.5 percent in the fiscal second quarter, slower than the 4.2 percent increase in the prior quarter. The figure includes Macy’s owned businesses as well as from licensed departments.

Macy’s now expects earnings per share for the year to be $3.95 to $4.15 per share. It had previously forecast $3.75 to $3.95 per share. Sales at stores opened at least a year should rise between 2 to 2.5 percent.

Macy’s shares fell more than 5 percent, or $2.22, to $39.65 in premarket trading. Shares have more than doubled over the past 52 weeks.

(© Copyright 2018 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)