update the plugin so it works with python2 and python3