closed #18

state now saved