compatible to python3