changed InputStream to use typed_data instead of list<int>