updated firebase integration