arduino save state added