added num_iterations command line option