use welford

replace custom write Mean/Std function