added a check for python2.7