make compatible with python3