improve macros