now works fine in python3