ported the plugin to python 3