Simplify code of streaming object