num_iterations added to global parameters.