updated eigenvector algorithm