use stream writer for response