stream termination example