fixed support for Py3, now tested and working