fixed for python 3