Macy’s, Inc. (MYSE:M) posted strong fourth quarter earnings before the markets opened today, sending the stock higher by more than 7% in pre-market trading. In early trading hours the stock is up 2.5% to $42.14. The behemoth retailer reported revenues and net earnings that beat Wall Street’s expectations.

The company reported fourth quarter revenue of $8.87 billion, down from the same quarter last year but exceeding analysts’ expectations of $8.83 billion. Net earnings clocked in at $543 million or $1.73 on a per share basis, down from $2.26 posted in the comparable quarter last year but slightly ahead of the Wall Street consensus estimate of $1.69.

Same store sales for the company dipped 4.3% for the quarter, although the number came in less than the company’s own expectations of a 4.7% dip.

Notably, Macy’s had already warned late last year that its top and bottom line performance for the fourth quarter will be affected by slower sales of winter apparel like sweaters and cardigans. But it seems the company was able to manage a turnaround for the last month of the fourth quarter ended January 30, 2016.

The company’s CEO Terry Lundgren in a press release said, “”While 2015 was challenging, our sales trend improved in January as the weather turned colder in northern climate zones and Macy’s and Bloomingdale’s were well-stocked in coats, boots, sweaters, gloves, hats and other seasonal goods.”

Besides tough winter weather, the traditional brick and mortar retailer likes its peers has been up against emerging ecommerce retailers like Amazon who are fast latching on to the growing trends of online shopping in the US and globally.

Like Walmart, Macy’s too has responded with investing to expand its online presence and closing down non-performing stores as a way to cap costs and consolidate operations. The company announced earlier in January it plans to close 14 of its 790 stores this year which will result in more than 1,300 employee layoffs.

For the new fiscal year 2016, the company expects to report adjusted earnings per share (EPS) between $3.8 and $3.9, while analysts are modeling a full year EPS number of $3.83.