converted to Python3