update to work with Python3