added 'save state' in front-end create function