better stream io connection