modified run_cosmics to accept more params. added iteration script