finalize API for plugins