example implementation of pure go covariancematrix