code snipped to test writing data to firebase