connected stream, fixed bugs