add method for calculation of second smallest eigenvalue and use it
refactoring, delete unused methods