copied in bencodej