Earlier this week, Gap's (NYSE:GPS) CEO, Glenn Murphy, announced that he was going to step down, naming Art Peck as his replacement. Peck is currently the head of Gap's digital division and has been with the company since 2005. The news brought Gap' stock crashing down, losing 12% by midday. That's great news for investors, as Gap is still in a very strong position.

Gap is the go to brand for the middle class the world over.

Apart from having a household flagship brand, Gap also controls a handful of other well-known or up-and-coming brands. Sales have been steady, -- though not stellar -- cash is coming into the business, and the company has been pushing its dividend payments up for years. With a price to earnings ratio well below the retail average, Gap looks like a solid buy.

The sales Gap
Let's get the weakest points out of the way first. Gap has been up and down on sales over the last year. While the company had a storming return in 2012, 2013 was lackluster, and 2014 has been just dribbling along. In it's the first half of this year, Gap's same store sales have fallen 1%, with the Gap brand pulling back gains from Old Navy. For comparison's sake, this time last year, total comparable sales were up 4%.

The difficulty in sales has caused Gap to treat 2014 like a sort of rebuilding year. The company's sales trouble has made it rethink how it approached customers and make changes in the first half that are supposed to take effect in the back half of the year. Murphy recently called out the progress that Old Navy had in margins in the first half, as an example, getting it set up for a stronger end to the year.

Plans are always to do better, though, and Gap is no different than any other optimistic brand. The real question for the company on the sales front will be, "Are Americans ready to spend again?" We're cutting back on the amount that we're willing to part with for non-essentials. That's hitting everyone in the retail space with teen apparel makers getting a heavy dose of trouble.

Looking at competitors like J. Crew, Abercrombie & Fitch, and Urban Outfitters, it's clear that no one is really winning right now. J Crew is the leader of this pack, with comparable store sales up 4% in its last quarter. Abercrombie recorded an 11% drop in comparable sales, while Urban Outfitters managed to hold flat, thanks to the success of its secondary brands.

Gap is running in the bottom half of this ugly pack, and sales is clearly the biggest concern for Peck, as he steps into the CEO role.

Cash rolls in
Even as sales have slogged along, Gap has managed to make cash. In the first half, the company generated free cash flow of $668 million, a 23% increase from the same period last year. Gap has used that flow to pay out solid dividends, increasing its annual payment consistently over the last decade. In the first half, it paid out $194 million in dividends.

Gap is also putting more into share repurchases, buying back 14.6 million shares in the first half at an average cost of $40.09 per share. Until the CEO announcement, that had been a very solid investment. Rounding out the balance sheet rundown, Gap has $1.5 billion in cash and $1.4 billion in long-term debts. To summarize, the company is financially sound.

Why a 'buy'
With the huge pullback after the Murphy announcement, Gap's stock has fallen to a P/E of 13.5. That puts it well below the retail industry average, but its prospects are much stronger than most of the companies in that same industry.

Gap is a solid business with a solid brand. Murphy's departure may mean a return to more advertising -- he was notorious for his dislike of marketing -- which could help Gap bring in new customers and increase its sales. With such a strong financial bedrock on which to build, Gap looks like a long-term winner, to me.