V0.6: Reformulation of variance calculation
V0.6: Reformulation of variance calculation