updating marginalize