lots of changes for plugins