convert pinlevelB macros to macros with arguments