ctx and stream