added support for python 3