writing to firebase