(AP) Bookseller Barnes & Noble said Thursday it is ending its commercial agreement with Microsoft for its Nook e-book reader ahead of its planned Nook spinoff. The news came as the largest U.S. traditional bookseller reported second-quarter net income that missed expectations. Barnes & Noble, beset by tough competition from online retailers like Amazon and discount stores like Wal-Mart, said in June that it plans to split off its money-losing Nook e-reader division as it looks to boost shareholder value. In 2012, Microsoft paid $300 million for a 17.6 percent stake in Barnes & Noble’s college bookstores and Nook business. The investment helped support the Nook business, and Barnes & Noble supplied Nook content and apps for Microsoft’s Windows products. On Thursday, Barnes & Noble said it will buy out Microsoft’s stake in the business for $125 million. The company also said the spinoff could occur by the end of August 2015.