fixed issue 19, stream is thread now