Shares in Coupa Software (COUP) traded sharply higher early Wednesday after the company surprised investors by swinging to a profit in its fiscal second quarter, and as earnings and sales forecasts for the third quarter beat analysts’ estimates.

Underpinned by strong growth in subscription revenues, group turnover surged by 38% to $61.7 million during the three months that ended July 31, from $44.6 million a year ago, surpassing the $56.6 million analyst consensus compiled by Capital IQ.

Adjusted earnings also beat the Street’s view, with proforma net income coming in at $0.05 per diluted share versus a loss of $0.10 per diluted share a year ago and an analyst estimate of a loss $0.09 per diluted share.

Coupa, which also announced early Wednesday the acquisition of the technology assets of workforce management and software provider, DCR Workforce, said it had added several new customers in the second quarter, including McCain Foods, Boyd Gaming (BYD), and US Concrete. Financial terms of the takeover were not disclosed.

Looking ahead, the company said it anticipated fiscal third-quarter sales to come in a range of $62 million to $63 million, and adjusted net loss per share to be between $0.01 and $0.04. That’s better than average analyst projections of $58.6 million in revenue and a net loss of $0.05 per share, according to data compiled by Capital IQ.

For the full fiscal year 2018-19, Coupa expects sales of $243 million to $245 million and proforma net loss per share of $0.06 to $0.11, yet again outpacing the market consensus revenue of $235.7 million and net loss per share forecast of $0.17.

Shares of the company surged more than 15% before the US market open on early Wednesday.