moved some mis-placed macros to their intended location