worked on the state saving, made a test