refactoring of Newton method
stretching derivatives