For d_state=2, loop on noutput_items