replaced 100 with MAX_ITER