some macros reorganized