Writing to firebase working