corrected set_output()