Added online average and variance