second part of do_macros() routine to replace original script
working, in conjunction with put_back()