saving the current state
saving current state