Source: Wiki Commons user Specious

Rite Aid Corp. (RAD 5.56%) was staggering under a heavy debt load and reeling from sagging sales tied to the Great Recession in 2009, but a timely debt refinancing, rising demand tied to aging baby boomers, and health insurance reform has allowed Rite Aid to do something few retailers have been able to do: resurrect itself from the brink of bankruptcy.

RAD Net Income (TTM) Chart

RAD Net Income (TTM) data by YCharts

Rite Aid's turnaround is undeniably one for the history books, but now that shares have soared from about $1 to nearly $9, investors might want to temper their expectations for future gains. That's because Rite Aid has a lot of hard work to do ahead of it if it hopes to deliver the kind of profitability necessary to justify its current valuation.

Transitioning to growth

Rite Aid's recovery stems from cost cutting moves such as store closures and debt refinancing, but recently, the company has been laying the groundwork for long term top-line growth.

Last April, the company bought the Texas-based healthcare clinic operator RediClinic to jump start its push into offering healthcare services that extend beyond immunizations and this year, the company agreed to acquire the pharmacy benefit manager EnvisionRx for $2 billion in cash and stock.

The RediClinic acquisition gives Rite Aid a proven template it can follow to successfully roll out clinics in its stores to compete against CVS Health and Walgreens Boots Alliance's in-store clinics.

CVS Health offers basic healthcare services through more than 1,000 Minute Clinics, and those clinics are boosting both its pharmacy and front-end sales. Similarly, Walgreens operates 400 clinics. Therefore, if Rite Aid wants to remain competitive, it needs to significantly grow the number of RediClinic locations in order to blunt the risk of customer defections.

The EnvisionRx acquisition also puts Rite Aid in a better position to challenge its larger rivals. Although EnvisionRx is significantly smaller than the operations run by its competitors, it should still boost Rite Aid's bargaining power with drug makers and drug distributors and provide new opportunities to team up with payers to capture more patient spending.

Source: Rediclinic

Both of those deals indicate that Rite Aid is finally at a point where it can start reinvesting cash flow back into its business for future growth, but management still faces headwinds that could keep a lid on profit.

Challenges remain

The company's store footprint, which includes 4,566 locations, remains much smaller than CVS Health and Walgreen's, and its locations aren't nearly as widespread across the country as its peers. For example, Rite Aid is mostly absent from Texas and Florida, two key markets where prescription demand tied to a growing population of retirees is very high.

Rite Aid also needs to spend a significant amount of money upgrading its remaining stores, many of which are outdated. While the company has made big progress in remodeling stores to its more profitable Wellness format, 2,825 stores still need to be changed over, and that spending is going to take a short term toll on income.

Additionally, costs tied to the ramp up of RediClinic and interest expense tied to financing its EnvisionRx deal could mean that there's little left over to reward shareholders with EPS growth in the coming year. Shareholders already saw those expenses come into play last quarter when Rite Aid reported EPS of $0.02 --half as much as it reported the year before.

Looking forward

Don't get me wrong, I'm a big fan of what Rite Aid's management has done. In fact, I believe that Rite Aid's shift to reinvesting for growth is both prudent and necessary at this point. However, there's likely to be a short term trade-off in the form of profit associated with these moves that could limit upside in the company's earnings and share price and for that reason I'm reining in my expectations for a move higher until the company's investments begin paying off in the form of bottom line growth. I think shares are a little too pricey right now.