making twitter.py compatible with new model