refactored to support Core Plugin feature