add newton's method