can now serialize state
Add support for serializing store