Changed to python 3 syntax