updated bencode.cpp