migrating to new MacroPlugin hooks