working on app state