add plugin support in core.js