Make more compatible with python3