async input stream, needs serious testing