runs now testing state saving
state saving almost done