syncing state between the service and the app