adding changes to torrent.py