lobachev' method
new realization
minor changes
implementation of gradient algorithm