Compatibility with python3