Wal-Mart is looking to improve its online business.

Wal-Mart Stores Inc. is moving higher after beating analyst estimates for the second quarter of fiscal year 2017 and raising guidance.

Earnings per share were $1.21 a diluted share. Adjusted earnings per share totaled $1.07 and were 5 cents above the $1.02 that FactSet analysts projected, but lower than last year’s $1.08. The adjustment included 14 cents from the sale of Yihaodian in China.

Net sales for Wal-Mart U.S. increased 3.1 percent to $76 billion, and Sam’s Club net sales fell 1.3 percent to $14.5 billion. The strength in the U.S. business was attributed to cleaner stores and a faster and friendlier checkout service. Plus, lower gas prices and unseasonably warm weather helped drive purchases.

Wal-Mart International net sales fell 6.6 percent to $28.6 billion due to a $2.7 billion currency headwind.

Wal-Mart said that e-commerce gross merchandise values, or GMV, increased 13 percent, with the U.S. market stronger than international.

Total revenue for the three months increased 0.5 percent to $120.9 billion from $120.2 billion a year earlier. Comp sales were up 1.6 percent driven by the seventh consecutive quarter of positive traffic. Consolidated gross margin increased 53 basis points.

Looking ahead, Wal-Mart is now projecting its fiscal year 2017 earnings to be in the range of $4.15 to $4.35. This is an increase from the previous guidance of $4 to $4.30. Wal-Mart is also forecasting that comp sales for the next quarter, ending Oct. 28, will be in the range of 1 to 1.5 percent for Wal-Mart U.S. and slightly positive for Sam’s Club.