general case for conditional gaussians