remove some duplicated confusing code located within some macros