Tesla has released its financial results for the second quarter of the year (Q2 2018), and it appears the company’s efforts to keep its books in check have yielded results. While it faced USD742.7 million in losses in Q2, the sum is considerably less than the record sum reported for Q1 2018.

The combined losses now amount to about USD1.53 billion for the first six months of 2018, but the company collected a record USD4 billion in revenue in Q2 2018. Moving into the third quarter of the year, Tesla brings with it a cash balance of about USD2.24 billion, which is a dip from the USD2.7 billion it had by the end of March.

In terms of spending, Tesla’s capital expenditure for Q2 2018 came up to USD610 million, again lower than what was reported for Q1 2018. For 2018, total capex has been adjusted to be slightly below USD2.5 billion, which is in line with the company’s efforts to cut costs. As a comparison, the company spent USD3.4 billion in capex in 2017.

Aside from the state of its financials, a more pressing matter for Tesla is its production performance, with the company saying that “no production ramp of any other product has been as closely watched and debated as that of (the Tesla) Model 3” in its release.

According to the company, it has managed to hit its target of producing 5,000 units of the Model 3 weekly in the month of July. Tesla is aiming to increase that figure to beyond 6,000 units by late August, and 10,000 cars as fast as it can. Meanwhile, 2,000 Model S and X cars are produced each week.

For Q2 2018, Tesla produced 53,339 vehicles and delivered 22,319 Model S and Model X cars, along with 18,449 Model 3s, totalling 40,768 units. The company was also proud to declare that in July, the Model 3 held the number one market share position in its segment in the United States, accounting for 52% of the segment overall. Models in the segment include the BMW 3 Series, Audi A4, Mercedes-Benz C-Class, Lexus IS and Jaguar XE.

The encouraging sales performance is reflected in its revenue from automotive sales and leasing, which amounted to USD3.36 billion, a far cry from the USD2.74 billion it secured in Q1 2018.

Keep in mind that Tesla has yet to deliver the fabled USD35,000 Model 3, the most affordable variant with a 50 kWh battery (aka Standard Battery). All variants so far are rather high spec, with the 75 kWH battery (aka Long Range Battery), a premium interior, dual-motor all-wheel drive (rear-wheel drive is default) and even a performance AWD version.

“It took 15 years to execute on our initial goal to produce an affordable, long-range electric vehicle that can also be highly profitable. In the second half of 2018, we expect, for the first time in our history, to become both sustainably profitable and cash flow positive,” Tesla said in its release to investors.

The company’s future plans, aside from increasing production of the Model 3, includes building a new global plant in China and introducing a slew of new models (Roadster, Semi, Model Y and a pick-up truck).