use istream for CTBNtransfer