for python3 and python 2.6