n_optimizer with arguments