method to save to firebase