add convergence check