tweaks to plugin.py