updating syntax for python 3