BlackBerry Ltd. (BBRY) shares were inching higher in trading Tuesday after reporting fiscal third-quarter earnings that surpassed Wall Street expectations, although revenue was down sharply from a year ago.

For its fiscal third quarter, Waterloo, Ontario-based BlackBerry reported a net loss of $117 million or $0.22 a share compared to a net loss of $89 million or $0.17 a share in the year ago fiscal third quarter. Revenue came in at $289 million, down sharply from $548 million in last year’s fiscal third quarter. Adjusted earnings came in at $0.02 a share, ahead of the penny loss analysts polled by Thomson Reuters I/B/E/S were looking for.

Software Sales Grow in Third Quarter

Analysts had expected BlackBerry to weigh in with revenue of $331.9 million. Looking out to the fiscal year, BlackBerry is forecasting a profit that is higher than the breakeven​ to $0.05 loss it had previously targeted.

The fiscal third quarter marks the first full quarter in which BlackBerry is no longer manufacturing handsets, having announced last quarter it would outsource production to focus on software. BlackBerry makes mobile security software and, with its QNX unit, software used in automobiles. During its fiscal third quarter, BlackBerry said software and services sales came in at $160 million, which is up 16% from last quarter. BlackBerry said it expects the software business to grow 30% for the fiscal year. (See also: BlackBerry to Stop Making Handsets.)

BlackBerry Confident In Its Shift to Software

During a conference call to discuss results with analysts, BlackBerry CEO John Chen said he “firmly believes that the move to a software business model will be positive for revenue growth going forward, sustainable profitability and overall shareholder value.” Chen noted that greater than 80% of its software and services customers are recurring business for BlackBerry.

During the fiscal third quarter, BlackBerry said it saw a small increase in the number of customers, increasing to around 3,300 from 3,000. BlackBerry also recorded its best gross margins ever in the fiscal third quarter as it moves away from production of smartphones and into higher-margin software and services. For the quarter, gross margins were 66.8%.

Earlier this month BlackBerry moved to upgrade its mobile security software in an effort to get more government and business customers. The new software, dubbed BlackBerry Secure, brings together all of its mobile security software into one product. BlackBerry said the platform was created to be the foundation that drives its software push. The software is cloud-enabled and covers the entire enterprise. (See also: BlackBerry Consolidates Security Software Products.)

Recently BlackBerry shares were up more than 2% to $7.89 a share on volume of 5.1 million shares.