add stream and stateful