adding encode and decode for bencode