python2.6 and python 3 compatible