tmp save for state
working solution