Added check for python 3