Changes to syntax for Python 3.x