added check on the amount of newton iterations used by solver