Update: writing to firebase