renamed toInputStream to toI