implementation for a welford one pass class