Added n_iter setting.