refine core macros