make stream readable & writable