updated to new plugin architecture