finish appState before refactor