minor updates to macro code