Updated both functions so they can now numerically generate the
covariance matrices.