persistent state

Pls rebase no merge

Using a pull request for code review purposes