added hooks for updating app state