updated to Python 3