Convert to python 3