After weeks of disappointing days, Wall Street finally got its act together for a decent rally, riding a wave of enthusiasm about corporate profits to the stock market's best gain in two months.

The Dow Jones industrial average climbed 159 points to 10,117.62. The Nasdaq Stock Market composite index gained almost 42 points to 1,964.65. The Standard & Poor's 500 stock index was up almost 18 points at 1,113.08.

For once oil prices were a positive for the market, lifting prices of oil company shares without depressing stocks of companies expected to suffer because of high energy prices.

Crude oil prices pulled back after a Saudi Arabian oil official suggested he would be satisfied with crude oil prices in the $30 to $34 a barrel range -- well below the record $41.72 set in Monday's futures market trading. Today on the New York Mercantile Exchange, crude futures dropped to just over $41 a barrel.

Setting the profits pace was the H. J. Heinz Co., which reported earnings jumped 92 percent thanks to new products like one-carb ketchup and frozen French fries that actually taste good when cooked in the microwave.

Catering to the low-carb diet craze is helping Heinz profits, but taking a bite out of Krispy Kreme donuts, which reported its first quarter loss ever and said it is slowing down construction of new stores because the impact on business from anti-carb diets.

Today's advance broke the stock indexes out of the pattern of weak trading that has been dominating the market. Technology stocks were particularly strong. Up for the third day in a row, the Nasdaq composite stretched its advance to almost 70 points.

Traders' heavy commitment to the market contrasted with the results of the latest Conference Board survey of consumer confidence which showed very little change last month.

Consumers are feeling better about the job market, but higher gasoline prices are having an effect on overall attitudes. While economists were counting on the confidence rating to improve significantly, it advanced only a tiny bit.