persisting todo states in memory