Add optional tolerance in convergence