Rewrite using Add-on SDK