added the error iteratiob