added check for python version, and support for Python3