add newton's method test