add encapsulation for sqrt-iter