support for python 3 (and python 2)