new macro fro batch-processing Amy_prj