rewrite as simple-stream