update to use a writeable stream instead of a transform