minor edit on stream process logic