add state persistence
update docs