need to add explicit state, storing everything in QB doesn't work.
added intermediate state layer.