added NaN test for accumulator