deprecated api
python 3 support