add generate_evec and convert eigenvectors to 1D array