updated the datatypes etc, so that the RsResult value is also contained in
the state
the chunk source