added text stream writer