simple changes to make macros more pluggable