Natural gas and oil producer Chevron Corp reported a drop of 43% in profit for the quarter on Friday, although its results were able to beat expectations on Wall Street as cost cutting and robust margins in refining helped to offset the strong impact of oil prices tumbling.

The reliance on its refining operations were similar to other rivals such as Shell and Exxon Mobil, as such companies are leaning on their refining segments for profit when oil get cheap,

Prices of oil have dropped over 40% since June of 2014 amidst a glut in the global supply. The good thing is that the quarter is finally over, said one oil analyst. Moving forward the cost will continue to drop and the prices of oil are slowing moving upwards, so the margins will see an improvement.

Shares of Chevron based in California dropped 1.4% in early Friday trading.

The No. 2 oil company in the U.S. posted a net income of $2.57 billion equal to $1.37 a share, which was down from last year during the same quarter of $4.51 billion equal to $2.36 per share. However, income was far better than expectations on Wall Street of just 79 cents per share.

Chevron recorded a loss in its oil production for the U.S., a key indicator the country is one of its largest cost areas.

Production was up 4% to more than 2.68 million barrels per day, boosted largely from operations in Argentina, Bangladesh and the United States.

Earnings in the refining unit for the company were doubled to over $1.42 billion as the slump in the price of oil of close to 50% since June of last year boosted its margins.

Chevron continued cutting costs during the quarter by reducing its operating expenses more than 9%.

John Watson the CEO said the company was taking many deliberate action that are lowering the cost structure and the efforts will show through more and more in the financial results as the year moves forward.