move the output at the end of the macro