Google finally ended its losing streak on Thursday when it beat expectations and posted better-than-expected profit for the first time in six quarters.

The company’s advertising revenue jumped 11% from last year to $16.02bn. Its consolidated revenue rose 11% to $17.73bn. The number of ads, or paid clicks, increased by 18%.

After closing at $601.78, Google shares rose to $663.54 in after-hours trading.

The almost 10% jump in stock “is reflecting the fact that they’ve effectively just beat earnings for the first time in several quarters,” said Victor Anthony, an analyst at Axiom Capital.

There was one other reason why investors and analysts were looking forward to Thursday’s call: Ruth Porat, Google’s new chief financial officer. Porat had previously worked as CFO at Morgan Stanley, and analysts were hoping that her past life on Wall Street would provide them with an ally on the other end of the phone.

“Our strong Q2 results reflect continued growth across the breadth of our products, most notably core search, where mobile stood out, as well as YouTube and programmatic advertising,” Porat said on Thursday.

“We are focused every day on developing big new opportunities across a wide range of businesses. We will do so with great care regarding resource allocation.”

According to Anthony, Porat’s comment about Google exercising “great care regarding resource allocation” was another catalyst for boost in stock prices.

Google’s capital expenditures in the second quarter, which totaled about $2.5bn, were primarily related to production equipment and data center construction.

“In our view, our infrastructure is one of our most strategic assets that we have,” said Porat.

When asked about the growth and success in the US, Porat attributed it to the company’s “diverse set of products” that continue to do well.

Omid Kordestani, Google’s chief business officer, echoed that sentiment. According to him, products like YouTube, Chrome and Android had over a billion users each.

The earnings presentation also touted the new photo app, which allows users to upload, save and share their photos.

Earlier this month, the app came under scrutiny after it automatically tagged a black couple as gorillas. Google apologized for the error and said that they are working on a long-term fix.

“It’s getting better every day,” Kordestani said of the app on Thursday.

Additionally, Porat fielded questions on regulatory pressures the company faces in Europe.

In April, the European Commission accused Google of skewing its search results to benefit its own shopping services.

“We see that Google has engaged in misconduct in a broad number of member states since 2008 and continues to do so,” Margrethe Vestager, EU’s competition commissioner, said at the time. “The commercial importance of appearing prominently in Google search results is obvious: if you can’t be found, you can’t do business.”

Skirting around the question, Porat said that Google operates within a competitive industry and looks forward to working with European Commission to address any concerns they might have.

The Associated Press contributed to this report.