improvements for TR macros