updated for new plugin model