added support for continuations, stream reading is now smooth