change the initial of w, still need to refine the convergence