persist to firebase