change to python 3 syntax