A quadratically convergent iterative method for nonlinear equations