phases are now added earlier to the eigenvectors; minor changes