Can now also handel zero variance in statistics