Oh how quickly things change!  Investors frustrated by Rite Aid Corporation's (NYSE: RAD) downbeat guidance just two weeks ago are breathing easier thanks to better-than-hoped sales in December.

Quickening sales pace

Strong results at Rite Aid's pharmacies helped same store sales at the retailer's 4,592 stores improve by 2.9% in December compared to a year ago. That was a bit better than the 2.7% growth reported in November.

Despite a 1% negative impact from generic introductions in 2013 and a 2% drop in prescriptions filled, sales at Rite Aid's pharmacies, which represent nearly 64% of Rite Aid's sales, sales grew by 4.1% in December

But scripts filled are flat year-over-year for the first 43 weeks of the Rite Aid's fiscal year. Some of that December drop is tied to hard-to-predict flu shots and flu prescriptions, suggesting investors shouldn't get too nervous about December's slide in prescriptions filled.

In total, the 2.9% same store growth handily outpaced the 0.5% same store gain over the past 43 weeks.  And the 1% front end sales growth, which is supported by an aggressive roll-out of the retailer's Wellness platform, effectively trounced the 0.1% front end growth so far this fiscal year.

Turning store growth into profit

In a bid to further strengthen its business, Rite-Aid continues to cut unprofitable stores. Those cost saving measures, coupled with more aggressive marketing, have helped Rite-Aid return to profitability

RAD EPS Diluted (TTM) Chart

RAD EPS Diluted (TTM) data by YCharts

Cost-cutting has reduced selling, general, and administrative costs to 25.67% of revenue from 25.85% in the third quarter, helping net income climb to 1.13% of sales from 0.99% last year.

The profit improvement is allowing Rite Aid to clean up its balance sheet, with cash climbing to $183 million from $129 million and long term debt dropping to $5.82 billion from $5.90 billion since March.

More work to do

Despite Rite Aid's improving numbers, the company still trails its larger competitors CVS (NYSE: CVS) and Walgreen (NYSE: WAG). Both CVS, with its high profile acquisition of Caremark in 2006, and Walgreen, fresh on the heels of a deal with drug distributor AmerisourceBergen, have moved to diversify their business away from brick and mortar. CVS and Walgreen's larger scale and faster adoption of margin friendly health care services, such as CVS's MinuteClinics, gives each operating margins significantly higher than Rite-Aid.

RAD Operating Margin (TTM) Chart

RAD Operating Margin (TTM) data by YCharts

That margin advantage is keeping CVS and Walgreen's valuation in check. The more speculative Rite Aid offers the highest forward P/E ratio of the three at 16.18.

Fool-worthy final thoughts

Hopes are likely high at Rite Aid, CVS, and Walgreen for 2014. While generic drugs carry lower prices which impact top line sales, they're more profit-friendly. That suggests a reacceleration from the recent slowdown in high profile patent expirations, commonly known as the patent-cliff, this year and next year could drive profit higher.

Despite worries over slow enrollment, a bump up in Medicaid enrollment and acceleration from the tepid rate of enrollment in private plans tied to the Affordable Care Act should also help drive script volume in 2014.

Another company you must watch this year

Opportunities to get wealthy from a single investment don't come around often, but they do exist, and our chief technology officer believes he's found one. In this free report, Jeremy Phillips shares the single company that he believes could transform not only your portfolio, but your entire life. To learn the identity of this stock for free and see why Jeremy is putting more than $100,000 of his own money into it, all you have to do is click here now.

Todd Campbell has no position in any stocks mentioned. Todd owns E.B. Capital Markets, LLC.  E.B. Capital's clients may or may not have positions in the companies mentioned.  Todd also owns Gundalow Advisor's, LLC.  Gundalow's clients do not have positions in the companies mentioned.  The Motley Fool has no position in any of the stocks mentioned. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.