implemented calculation of eigenvalues in main