added LAPACK for eigenvector decomposition and added covariance