saving current state
saving current state