improved appState Service