replace macro from Macro class to func