python 3 syntax fix