improving writable stream