using iteration stopping criteria