modified to decoding macros