newton method working already