improvements to plugin