fixed macro recording, and hdr macro
moved test to more general place