Create newtons method